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 "Tapestry5HowtoSelectWithObjects" by VolkerNeumann
Date Wed, 21 May 2008 21:52:52 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:
typos and english fixes

------------------------------------------------------------------------------
   * 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 name property - if name is composed of few properties, add an transient property
to your Object
+  * 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 get inject it into your page easily

+  * !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

   {{{
  @Inject private PropertyAccess _access;
  }}}
  
- Another catch is that Value encoder needs the original list to recreate the object later
after form is submitted.
+ Another catch is that Value encoder needs the original list to recreate the object later
after the form is submitted.
  So we implement ValueEncoder interface directly in our !SelectModel implementation, and
supply the model both as model and encoder parameter of Select component.
  {{{
  <t:select model="myModel" encoder="myModel" value="someBean"/>
  }}}
  
  [[BR]]
- Here's code for the !SelecModel implementation: !GenericSelectModel
+ Here's code for the !SelectModel implementation: !GenericSelectModel
  {{{
  import java.util.ArrayList;
  import java.util.List;

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


Mime
View raw message