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.
################################################################################################################

Reply via email to