You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by Apache Wiki <wi...@apache.org> on 2010/05/28 21:06:47 UTC
[Tapestry Wiki] Trivial Update of "Tapestry5AnotherSelectWithObjects" by newacct
Dear Wiki user,
You have subscribed to a wiki page or wiki category on "Tapestry Wiki" for change notification.
The "Tapestry5AnotherSelectWithObjects" page has been changed by newacct.
http://wiki.apache.org/tapestry/Tapestry5AnotherSelectWithObjects?action=diff&rev1=9&rev2=10
--------------------------------------------------
public GenericSelectionModel(List<T> list, String labelField, PropertyAccess access) {
if(list == null) list = new ArrayList<T>();
if(labelField != null && !labelField.equalsIgnoreCase("null")){
- if(list.size() > 0){
+ if(!list.isEmpty()){
this.labelFieldAdapter = access.getAdapter(list.get(0).getClass()).getPropertyAdapter(labelField);
}
}
@@ -91, +91 @@
public GenericValueEncoder(List<T> list, String idField, PropertyAccess access) {
if(list == null) list = new ArrayList<T>();
if (idField != null && !idField.equalsIgnoreCase("null")){
- if(list.size() > 0){
+ if(!list.isEmpty()){
this.idFieldAdapter = access.getAdapter(list.get(0).getClass()).getPropertyAdapter(idField);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org