Improve SelectItem(s) handling compatibility with JSF 2.0
---------------------------------------------------------

                 Key: RF-10131
                 URL: https://issues.jboss.org/browse/RF-10131
             Project: RichFaces
          Issue Type: Task
      Security Level: Public (Everyone can see)
          Components: compatibility
    Affects Versions: Future_4.X
         Environment: myfaces 2.0.3, richfaces 4.0 trunk rev. 20883
            Reporter: Martin Kočí
            Priority: Minor


1) JSF 2.0 specifies new attributes itemLabel, itemDescription and itemDisabled 
for f:selectItem(s). Unfortunately those attributes are not part of public API 
but every renderkit must reimplement it again in own code base. RichFaces 
org.richfaces.component.util.SelectUtils.getSelectItems(FacesContext, 
UIComponent) currently support only old JSF 1.2 style (SelectItem instances are 
obtained from value="#{}"). 

Implement support for f:selectItems value="#{}" var="variable" 
                                                        itemLabel="#{...}" 
itemValue="#{...}"/>

2) null or empty SelectItems handling: o.j.rf.SelectUtils throws an exception 
if no SelectItem(s) are available. If think this is too agressive and not very 
useful for user. I suggest to use myfaces-like solution: a warning in 
development stage like:

WARNING: ValueExpression #{de.bier.humpen} of UISelectItems with component-path 
{Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: 
/X500Form.xhtml][Class: javax.faces.component.html.HtmlBody,    ...  ][Class: 
javax.faces.component.UISelectItems,Id: selectItemsId} does not reference an 
Object of type SelectItem, array, Iterable or Map, but of type: null

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

_______________________________________________
richfaces-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/richfaces-issues

Reply via email to