[Tapestry Wiki] Update of "Tapestry5HowtoSelectWithObjects" by RadoslavBielik

View: New views
1 Messages — Rating Filter:   Alert me  

[Tapestry Wiki] Update of "Tapestry5HowtoSelectWithObjects" by RadoslavBielik

by Apache Wiki :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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 RadoslavBielik:
http://wiki.apache.org/tapestry/Tapestry5HowtoSelectWithObjects

The comment on the change is:
Updated the GenericSelectModel to work with Tapestry 5.0.13

------------------------------------------------------------------------------
- Creating a <SELECT> is a bit complicated and there is only support for strings and enums currently. (T5.0.5)
+ Creating a <SELECT> is a bit complicated and there is only support for strings and enums currently. (T5.0.13)
 
  see also: Tapestry5SelectObject
 
@@ -68, +68 @@

          List<OptionModel> optionModelList = new ArrayList<OptionModel>();
          if (labelFieldAdapter == null) {
              for (T obj : list) {
-                 optionModelList.add(new OptionModelImpl(nvl(obj), false, obj, new String[0]));
+                 optionModelList.add(new OptionModelImpl(nvl(obj)));
              }
          } else {
              for (T obj : list) {
-                 optionModelList.add(new OptionModelImpl(nvl(labelFieldAdapter.get(obj)), false, obj, new String[0]));
+                 optionModelList.add(new OptionModelImpl(nvl(labelFieldAdapter.get(obj)), obj));
              }
          }
          return optionModelList;

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

LightInTheBox - Buy quality products at wholesale price