[jboss-user] [JBoss Seam] - Re: [JBSEAM-1302]: Conversion support for selectMany for Set

fhh do-not-reply at jboss.com
Fri May 18 06:04:46 EDT 2007


I took a closer look at the jsf implementation. The relvant bit of code is this (from com.sun.faces.renderkit.html_basic.MenuRenderer.convertSelectManyValue()):


  | 
  |             modelType = valueExpression.getType(context.getELContext());
  |             // Does the valueExpression resolve properly to something with
  |             // a type?
  |             if (null != modelType) {
  |                 if (modelType.isArray()) {
  |                     result = convertSelectManyValues(context,
  |                                                      uiSelectMany,
  |                                                      modelType,
  |                                                      newValues);
  |                 } else if (List.class.isAssignableFrom(modelType)) {
  |                     result = Arrays.asList((Object[]) convertSelectManyValues(
  |                           context,
  |                           uiSelectMany,
  |                           Object[].class,
  |                           newValues));
  |                 } else {
  |                     throwException = true;
  |                 }
  |  
  | 
  | 

So, this seems to be a limitation of JSF indeed.

What surprises me is that it would be trivival to fix. Sets must have been left out on purpose. Does anybody know why? The way the html component work, support for sets seems more natural then lists.

Regards

Felix

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4046751#4046751

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4046751



More information about the jboss-user mailing list