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 "Tapestry5HowtoSelectWithObjects" by VolkerNeumann
Date Wed, 21 May 2008 21:53:54 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 VolkerNeumann:
http://wiki.apache.org/tapestry/Tapestry5HowtoSelectWithObjects

The comment on the change is:
oops, missed a few typos

------------------------------------------------------------------------------
   * !ValueEncoder to generate value parameter for <option> tag and restore the selected
value back after form is submitted
  
  Eums and strings are ok, but many people will want to use Objects (Beans, POJO-s from database
via ORM).
- This has proven to be a dificult task, especialy since we are all new to T5.
+ This has proven to be a dificult task, especially since we are all new to T5.
  
  Here is an example of a !SelectionModel that simplifies using Select component with objects.
It requires 5 parameters
   * List<T>  - the list of objects that can be selected
   * Class<T> - Superclass of all objects in the list (this is because of Generics deletion
at runtime) so an adapter can be produced (even byte code generated one might be implemented
in Tapestry-ioc later on)
-  * name of the identifier property - a property that identifies the object (usualy id if
object is from database), it will be used as value attribute for the <option>
+  * name of the identifier property - a property that identifies the object (usually id if
object is from database), it will be used as value attribute for the <option>
   * name of the name property - if name is composed of few properties, add a transient property
to your Object
   * !PropertyAccess - this is an Tapestry-ioc service that the selection model uses to access
properties from the object and you must supply it. You can inject it into your page easily

   {{{

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


Mime
View raw message