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 MassimoLusetti:
http://wiki.apache.org/tapestry/Tapestry5HowToUseForms

The comment on the change is:
The event is "selected" not "select"

------------------------------------------------------------------------------
  @Component
  private Submit submit2;
  }}}
-  1. add event listeners for "select" event on both buttons and save the 
return value the form action should return on success: {{{
+  1. add event listeners for "selected" event on both buttons and save the 
return value the form action should return on success: {{{
  private Object formEventReturn;
- void onSelectFromSubmit1() { 
+ void onSelectedFromSubmit1() { 
    // do whatever; 
    formEventReturn = AnotherPage.class; // go to AnotherPage
  }
- void onSelectFromSubmit2() { 
+ void onSelectedFromSubmit2() { 
    // do whatever
    formEventReturn = null; // stay on this page
  }
@@ -79, +79 @@

  }
  }}}
  
- All this has to be done because the Submit cannot add a context to the form 
(though ["Tapestry5SubmitContextComponent"] can) and the "select" 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])
+ 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])
  
  ==== Forms and Names ====
  If you don't specify a name for the form, tapestry will generate a form whose 
name is the same as the id.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to