1 Reply Latest reply on Mar 7, 2014 3:12 AM by liumin hu

    Set value in rich:select via bean method

    Alex Davidovich Newbie


      i created a rich:select with id="client" and a4j:ajax that triggers a bean method that copies the value from the

      client rich select and put it in another rich:select with id="doctor".

      I succeeded in executing the method when a value is selected in the client and changing the property but it does not show

      on the page.


      the first rich:select with ajax-


      <rich:select id="client" enableManualInput="true" value="#{orderManagementBean.order.ordererName}" selectItemClass="list">

                                 <a4j:ajax execute="@form" render="doctor" listener="#{orderManagementBean.copyDoctor}" event="selectitem"></a4j:ajax>

                                 <f:selectItems itemValue="#{orderManagementBean.order.ordererName}" value="#{orderManagementBean.clients}" />



      the second rich:select -

      <rich:select  id="doctor"  enableManualInput="true" value="#{orderManagementBean.order.dentistName}" selectItemClass="list" hideNoSelectionOption="false" >


                              <f:selectItems value="#{orderManagementBean.doctors}" />



      the bean method-


      public void copyDoctor(AjaxBehaviorEvent e)


              Client doctor =  (Client) orderDao.getCodeByName(Client.class, order.getOrdererName());


              if (!doctor.isClinicInd())






      after i chose a value in the "client" rich:select  and the method is executed, nothing happens to the doctor rich:select.

      any help will be appreciated!