3 Replies Latest reply on Nov 8, 2010 9:39 AM by Leonid Sokolin

    rich:comboBox overrides its list value with selected

    Leonid Sokolin Newbie

      I noticed some strange behavior in how rich:comboBox shows its select items and wonder somebody could help me to figure out where is the problem.

       

      I have a comboBox, which is used to select a value for a table's column. When use clicks on the Add button on the screen value selected in the box is supposed to be added to the table. I noticed that after value is added, it is also overriding the first value in a dropdown list of this combo box.

       

      For example, if I have values A, B and C in drop down and select first A and click Add and then B and click Add.

      Then, I would see "B,B,C" in a drop down instead of original "A,B,C".

       

      I verified that List of SelectItems behind this drop down never changes. Any ideas what might be causing it?

       

      Please see the piece of code below as well as front page and supporting bean files attached.

       

      Thanks,

       

      Leonid

       

      <

      rich:column>

       

      <rich:comboBox id="productID" value="#{qtBeanParam.curProdBenchRF.code}"

       

      valueChangeListener="#{qtBeanParam.changeProductCode}"

       

      immediate="true" enableManualInput="true"

       

      converter="#{productBenchIDConverter}" width="100" listWidth="150">

       

       

      <a4j:support event="onselect" reRender="productInp,benchmarkInp,benchmarkInpList" ajaxSingle="true" />

       

      <f:selectItems id="productIDList" value="#{qtBeanParam.shortNameProductBenchList}" />

       

      </rich:comboBox>

       

      <rich:message for="productID" style="color:red;" />

       

      </rich:column>

      ...

      <

       

      a4j:commandButton id="addPortButtonInp" value="Add"

       

      action="#{qtBeanParam.addProduct}" immediate="false" reRender="selectedProducts,sectorSel,periodicity,grossnet,retTypeLbl,retTypeSel,productID,productIDList,productInp,productInpList,fundTypeLbl,fundTypeSel,planTypeLbl,planTypeSel,groupbyBM"

       

      styleClass="blue-button">

       

      </a4j:commandButton>