Uploaded image for project: 'RichFaces'
  1. RichFaces
  2. RF-10131

Improve SelectItem(s) handling compatibility with JSF 2.0

    Details

    • Type: Enhancement
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 4.0.0.Milestone6
    • Component/s: compatibility
    • Labels:
      None
    • Environment:

      myfaces 2.0.3, richfaces 4.0 trunk rev. 20883

    • Affects:
      Documentation (Ref Guide, User Guide, etc.), Interactive Demo/Tutorial

      Description

      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

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  artdaw Gleb Galkin
                  Reporter:
                  markoc50 Martin Kočí
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: