0 Replies Latest reply on Dec 29, 2014 5:00 PM by Vasil Lukach

    Unexpected behavior of rich:pickList after validation error

    Vasil Lukach Newbie

      I have simple pickList

       

      <rich:pickList id="salesReportFields"
          value="#{reportForm.selectedSalesFields}"
          required="true"
          requiredMessage="#{msg.incorrectSelectedReportFields}">
          <f:selectItems value="#{reportForm.salesAllFields}" />
      </rich:pickList>
      
      
      

       

      on page with other UI components.

       

       

      When some items are selected in pickList and Submit button is pressed, then set of selected items is changed in case if some validation error (for other UI component) presents on page.

      It is changed to previous set (before validation error). For example in case if this is first time error, then pick list content is reset (deselect all selected items).

       

      It happens with 100% probability when pick list is used in combination with selectManyListbox (and item of selectManyListbox is not selected)

      <h:selectManyListbox id="clientList"
          value="#{reportForm.selectedProviderIds}"
          label="#{msg.client}" size="8"
          valueChangeListener="#{reportForm.providerSelectionChanged}"
          immediate="true"
          required="true">
          <f:selectItems value="#{reportForm.providerList}"
              var="client"
              itemLabel="[#{client.providerCode}] #{client.name}"
              itemValue="#{client.providerId}" />
          <a4j:ajax event="change" render="retailerList, programList, salesReportPickersPanel" />
      </h:selectManyListbox>
      
      
      

       

      Is it normal behavior? Can it be related to something else?

       

      Note: RichFaces 4.3.5 is used, reportForm is SessionScoped bean.