Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 4.2.2.Final
    • Fix Version/s: 4.5.0.CR1
    • Component/s: component-selects
    • Labels:
    • Environment:

      Ubuntu 12.04, Tomcat 6.0.35, Mojarra 2.1.8 OR MyFaces 2.1.7

    • Workaround:
      Workaround Exists
    • Workaround Description:
      Hide

      Make all labels unique:

      <f:selectItem itemLabel="1" itemValue="1"/>
      <f:selectItem itemLabel="abcdef" itemValue="abcdef"/>
      <f:selectItem itemLabel="2" itemValue="2"/>
      

      Show
      Make all labels unique: <f:selectItem itemLabel="1" itemValue="1"/> <f:selectItem itemLabel="abcdef" itemValue="abcdef"/> <f:selectItem itemLabel="2" itemValue="2"/>

      Description

      Given rich:select:

      <rich:select value="#{bean.testValue}">
          <f:selectItem itemLabel="1" itemValue="1"/>
          <f:selectItem itemLabel="1" itemValue="abcdef"/>
          <f:selectItem itemLabel="2" itemValue="2"/>
          <f:ajax event="selectitem" listener="#{bean.testListener}"/>
      </rich:select>
      

      and the bean:

      @ManagedBean
      @ViewScoped
      public class Bean implements Serializable {
      	private String testValue;
       
      	public String getTestValue() {
      		return testValue;
      	}
       
      	public void setTestValue(String testValue) {
      		System.out.println("setter: " + testValue);
      		this.testValue = testValue;
      	}
       
      	public void testListener(AjaxBehaviorEvent e) {
      		System.out.println("listener: " + testValue);
      	}
      }
      

      Whatever item with label "1" is selected, the output is the same:

      setter: abcdef
      listener: abcdef
      setter: abcdef
      listener: abcdef
      setter: abcdef
      listener: abcdef

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                bleathem Brian Leathem
                Reporter:
                denis_k Denis Kniazhev
              • Votes:
                1 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: