tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Tapestry Wiki] Update of "Tapestry5HowToUseForms" by MassimoLusetti
Date Tue, 21 Aug 2007 10:15:07 GMT
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/%3cecd0e3310703190722q23611acdm805975dc08cd9532@mail.gmail.com%3e
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/%3cecd0e3310703190722q23611acdm805975dc08cd9532@mail.gmail.com%3e
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: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Mime
View raw message