5 Replies Latest reply on May 7, 2009 6:30 AM by nbelaevski

    rich:jQuery and update by ajax

      Hello,

      I have a component "selectManyListbox" with rich:jQuery. Everything works correctly (example when you open the page), but when an ajax request which it updates the "selectManyListbox", it does not work anymore.

      If I remove "rich:jQuery" everything works, even after the ajax request.

      The error is: The list of items is empty after the update with ajax.

      Below the code for better explanation:

      <table>
       <tr>
       <td> State: </td>
       </tr>
       <tr>
       <td>
       <h:selectOneMenu value="#{myBeanTest.state}" reRender="touristRegions" >
       <s:selectItems value="#{myBeanTest.states}" var="state" label="#{state.name}"
       noSelectionLabel="#{messages['msg.select.option']}"/>
       <s:convertEntity/>
       <a4j:support event="onchange" />
       </h:selectOneMenu>
       </td>
       </tr>
       <tr>
       <td> City: </td>
       </tr>
       <tr>
       <td>
       <a4j:outputPanel id="citiesPanel" ajaxRendered="true" >
      
       <h:selectManyListbox id="cities" value="#{myBeanTest.cities}" >
       <s:selectItems value="#{myBeanTest.citiesByState}" var="city" label="#{city.name}" />
       <s:convertEntity/>
       </h:selectManyListbox>
       <rich:jQuery selector="#cities" timing="onload" id="selectCities"
       query="multiSelect({oneOrMoreSelected: '*', selectAll: false, noneSelected: '#{messages['msg.select.option']}'})"/>
      
      
       </a4j:outputPanel>
       </td>
       </tr>
      </table>
      


      Somebody help me?
      APIs used:

      Rich Faces: 3.1.4.SR1
      JQuery: 1.3.1

      Thanks
      Pedro Neves - Brazil