Hi again Taha,

I spent more time as I told you to see if I did something wrong, and I tried 
all the options on 
http://mail-archives.apache.org/mod_mbox/tapestry-users/200703.mbox/browser 
also, and nothing worked.

Please find the files attached... your help is much appericated

Thanks
Amr

-----Original Message-----
From: Taha Hafeez [mailto:tawus.tapes...@gmail.com] 
Sent: 05 أبريل, 2011 11:09 ص
To: Tapestry users
Subject: Re: a form that have an upload, submit button

Can you share the full code/template of the page ?

regards
Taha


On Tue, Apr 5, 2011 at 12:30 PM, Amr Mohamed Mahmoud Hassanien < 
amr.hassan...@dmi.ae> wrote:

> Hello All,
>
>                   I have followed the example in 
> http://wiki.apache.org/tapestry/Tapestry5HowToUseForms to make 
> multiple submit buttons in a page and it doesn't work very well.
>                 Actually my case is a little bit different where in 
> the same form I have an upload button which looks like that:
>
> <input t:type="submit" value="${message:upload-label}" t:id="upload"/>
>
> And handlers as follows:
>
> void onSelectedFromUpload(){
>        this.submissionType = SubmissionType.UPLOAD;  }
>
> public Object onSuccess() {
>            switch (submissionType) {
>            case SUBMIT:
>                  return submit();
>            case UPLOAD:
>                  return upload();
>            case CANCEL:
>                  return cancel();
>            default:
>                  return submit();
>            }
>
>      }
>
> I put breakpoints in both methods and start debugging and no 
> breakpoint got hit.
>
>
> I am expecting that on clicking the Upload button, the form will be 
> Submitted in a "multipart/form-data" post. Please not that I have two 
> other submit buttons as follows:
>
>
>        <input t:type="submit" value="${message:submit-label}"
> t:id="submit"/>
>
>        <input t:type="submit" value="${message:cancel-label}"
> t:id="cancel"/>
>
>
>
> What I am doing is that on clicking Upload, I get the file uploaded 
> and save it temporary in a persistent List(in the session) ,and on 
> Submit I permanently save it and on cancel I just discard the uploaded files.
>
>
>
> Any idea why the breakpoints have not got hit?
>
> Do you think that this scenario is possible to be implemented? I just 
> suspect that having more that submit button , will send 
> "multipart/form-data" post on clicking at any of them.
>
>
>
> Regards,
>
> Amr
>
>
>
>
>
>
>
> ######################################################################
> ##########################################
> DISCLAIMER:
> This message is for the named person's use only. It may contain 
> confidential information, proprietary in nature or legally privileged 
> information. All trade secret, know how, formulas, researches, 
> database, software, codes diagrams, documentations, attachments, 
> voice, concepts and visual content are strictly protected by United 
> Arab Emirates Laws and Dubai Media Incorporated codes which will have 
> the right to take any legal action if you fail in doing the hereunder 
> steps. If you receive this message in error, please immediately DELETE 
> it and all copies of it from your system, DESTROY any hard copies of 
> it and destroy any soft and backup copy of it saved in any kind of 
> form under you possession and NOTIFY the sender.
> You must not, directly or indirectly, use, disclose, distribute, 
> print, or copy any part of this message (email) if you are not the 
> intended recipient.
>
> ######################################################################
> ##########################################
>

################################################################################################################
DISCLAIMER:
This message is for the named person's use only. It may contain confidential 
information, proprietary 
in nature or legally privileged information. All trade secret, know how, 
formulas, researches, database, 
software, codes diagrams, documentations, attachments, voice, concepts and 
visual content are strictly 
protected by United Arab Emirates Laws and Dubai Media Incorporated codes which 
will have the right to 
take any legal action if you fail in doing the hereunder steps. If you receive 
this message in error, 
please immediately DELETE it and all copies of it from your system, DESTROY any 
hard copies of it and 
destroy any soft and backup copy of it saved in any kind of form under you 
possession and NOTIFY the sender.  
You must not, directly or indirectly, use, disclose, distribute, print, or copy 
any part of this message (email) 
if you are not the intended recipient.
################################################################################################################

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to