Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-3901

f:selectItems ignore itemDescription within h:selectOneListbox

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Not A Problem
    • 2.2.3
    • None
    • None
    • None
    • java 7, tomcat 7

    Description

      I have a <h:selectOneListbox> with underlying List:

      List<SelectItem> mylist = new ArrayList<SelectItem>();
      mylist.add(new SelectItem("testvalue", "testlabel","testdescription"));
      

      I want to show a tooltip over any option of a selectbox.
      Therefore I tried two options:

      1.

      <h:selectOneListbox value="#{bean.myvalue}" ...>
      	<f:selectItems value="#{bean.mylist}" var="item" itemValue="#{item.value}" itemLabel="#{item.label}" itemDescription="yyy#{item.label}"/>
      </h:selectOneListbox>
      

      2.

      <h:selectOneListbox value="#{bean.myvalue}" ...>
      	<f:selectItems value="#{bean.mylist}" var="item" itemValue="#{item.value}" itemLabel="#{item.label}" passtrough:title="yyy#{item.label}"/>
      </h:selectOneListbox>
      

      Option 1 ignores itemDescription. Only label and value are rendered.
      Option 2 renders title attribute, but fills title only with "yyy" and ignores value of #

      {item.label}

      I think, that this behaviour is a bug.

      Attachments

        Activity

          People

            Unassigned Unassigned
            reneo Rene O
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: