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] Trivial Update of "Tapestry5HowToUseForms" by CesarLesc
Date Mon, 08 Oct 2007 16:28:56 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 CesarLesc:
http://wiki.apache.org/tapestry/Tapestry5HowToUseForms

------------------------------------------------------------------------------
  
  
   *prepare -> calls onPrepare()
+     Is called before the form process is data and when the form needs to render itself (just
one time).
-  *validate -> calls onValidate()
+  *validate -> calls onValidate() 
+     To allow for cross-form validation 
+    (use [http://tapestry.apache.org/tapestry5/tapestry-core/apidocs/org/apache/tapestry/corelib/components/Form.html#recordError(org.apache.tapestry.Field,%20java.lang.String)
form.recordError(field,message)])
   *success -> calls onSuccess()
+     After all validation are passed.   
   *failure -> calls onFailure()
+     If  have validation errors.
   *submit -> calls onSubmit()
+     Allways called regardless of success or failure.
  
  
  ==== Context Information ====
  
  Sometimes you need to store additional data in a form (like the primary key of an entity
in a edit page)
  in such cases use the context parameter of the form, and retrieve this parameter with the
onPrepare event.
+ You can also the other event if you like.
  
  for example the template:
  {{{

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Mime
View raw message