1 Reply Latest reply on Jun 23, 2008 3:32 AM by lmk

    combobox vs selectOneListBox

    hassane

      hi everyone,

      does combobox accept a list of type SelectItem(Object value, String label) ?

      because even if i pass such a list, the combobox will always interpret it as of type SelectItem(Object value)

      knowing that the value might hold IDs of my items... in selectOneListBox it works just fine

      one more thing is that ajax support works in selectOneListBox while nothing happens while using combobox ...


      here's how my components are coded :


      <rich:comboBox selectFirstOnUpdate="false"
       value="#{addActivity.selectedProject}"
       defaultLabel="Enter a project">
      
       <f:selectItems value="#{addActivity.projectItems}" />
       <a4j:support event="onchange" reRender="selectTask" />
      </rich:comboBox>
      


      <h:selectOneListbox id="selectProject"
       value="#{addActivity.selectedProject}"
       size="1">
       <f:selectItems value="#{addActivity.projectItems}" />
       <f:converter converterId="longConverter" />
       <a4j:support event="onchange" reRender="selectTask" />
      </h:selectOneListbox>
      


      is the combobox unable to do the work properly? or does it have another methodology to proceed with?