Dear Wiki user, You have subscribed to a wiki page or wiki category on "Tapestry Wiki" for change notification.
The following page has been changed by AngeloChen: http://wiki.apache.org/tapestry/Tapestry5HowToUseForms ------------------------------------------------------------------------------ All this has to be done because the Submit cannot add a context to the form (though ["Tapestry5SubmitContextComponent"] can) and the "selected" events must not return any objects (just void). The idea for this solution is from HLS (see [http://mail-archives.apache.org/mod_mbox/tapestry-users/200703.mbox/[EMAIL PROTECTED] HLS on mailing-list about multiple submits]) + ==== Dealing with multiple submits: sample 2 ==== + + First the template: + {{{ + <t:form> + <!-- some inputs here or a beaneditor --> + <input t:type="submit" value="Update" t:id="update" /> + <input t:type="submit" value="Cancel" t:id="cancel" /> + </t:form> + }}} + + Then the page class: + {{{ + private boolean cancel; + void onSelectedFromUpdate() { + cancel = false; + } + void onSelectedFromCancel() { + cancel = true; + } + void onSuccess() { + if (cancel) { + } else { + } + } + }}} ==== Forms and Messages Resources (Internationalization) ==== You can customize the field's label and validation messages used in a form, providing the followings entries in the properties file for the page. {{{ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
