[richfaces-issues] [JBoss JIRA] Commented: (RF-10131) Improve SelectItem(s) handling compatibility with JSF 2.0

Martin Kočí (JIRA) jira-events at lists.jboss.org
Wed Jan 5 11:09:18 EST 2011


    [ https://issues.jboss.org/browse/RF-10131?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12573516#comment-12573516 ] 

Martin Kočí commented on RF-10131:
----------------------------------

Ideally should JSF 2.next introduce  UISelect, a convenient parent for UISelectOne, UISelectMany, UISelectOrder etc. with method  List<SelectItems> UISelect.getSelectItems()

http://www.mail-archive.com/dev@myfaces.apache.org/msg50098.html

> Improve SelectItem(s) handling compatibility with JSF 2.0
> ---------------------------------------------------------
>
>                 Key: RF-10131
>                 URL: https://issues.jboss.org/browse/RF-10131
>             Project: RichFaces
>          Issue Type: Enhancement
>      Security Level: Public(Everyone can see) 
>          Components: compatibility
>         Environment: myfaces 2.0.3, richfaces 4.0 trunk rev. 20883
>            Reporter: Martin Kočí
>            Assignee: Nick Belaevski
>             Fix For: Future_4.X
>
>
> 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

       



More information about the richfaces-issues mailing list