5 Replies Latest reply on Jul 22, 2009 1:50 PM by Tanya Ruttenberg

    rich:comboBox vs. h:selectOneMenu

    Tanya Ruttenberg Expert

      I have these two components with identical list contents using s:selectItems component. Like this

      <h:selectOneMenu value="#{office.state}">
       <s:selectItems value="#{statesList.resultList}" var="_state"
       label="#{_state.abbreviation} (#{_state.fullName})"
       itemValue="#{_state.abbreviation}" />
      </h:selectOneMenu>
      


      and this

      <rich:comboBox defaultLabel="Start typing or click the arrow" value="#{office.state}">
       <s:selectItems value="#{statesList.resultList}" var="_state"
       label="#{_state.abbreviation} (#{_state.fullName})"
       itemValue="#{_state.abbreviation}" />
      </rich:comboBox>
      


      The JSF selectOneMenu renders a list of options that look like this

      AL (Alabama)
      AK (Alaska)

      where the Richfaces option list looks like this

      AL
      AK

      Why the difference?

      TDR