9 Replies Latest reply on Jul 8, 2008 3:13 AM by Miglena Borisova

    rich:pickList disables itself when reRendered...

    Miglena Borisova Newbie

      Hi, guys,
      I need some help with a rich:pickList, which is filled upon a selection from a h:selectOneMenu.
      The problem is that, upon load of the page, the pickList is OK, and I am able to copy/remove/copyAll/removeAll the items in it. Upon selection of another field from the drop down menu, the list is well reRendered with other items, but I can no longer click to select an item, neither use the copyAll button. This problem is both IE and Firefox.

      Here is the code:

      <h:panelGrid columns="2" columnClasses="wfcol1" cellspacing="5" cellpadding="10">
       <h:outputText value="#{messages['template.useExisting']}"/>
      
       <h:selectOneMenu id="existingTemplate" value="#{templateManager.template}">
       <s:selectItems value="#{templateManager.userTemplates}" var="existingTemplate" label="#{existingTemplate.name}" noSelectionLabel="-"/>
       <s:convertEntity />
       <a4j:support event="onchange" reRender="pickListTemplateFields" actionListener="#{templateManager.resetPickList}" ajaxSingle="true"/>
       </h:selectOneMenu>
      </h:panelGrid>
      
      <h:panelGrid columns="2" columnClasses="wfcol1" cellspacing="5" cellpadding="10" style="width:70%">
       <s:decorate id="pickListFields" template="/layout/decorate.xhtml" rendered="true">
       <ui:define name="label"><h:outputText value="#{messages['template.useFields']}" /> </ui:define>
      
       <rich:pickList id="pickListTemplateFields" sourceListWidth="200" targetListWidth="200"
       copyAllControlLabel = "#{messages['pick.copyAllLabel']}" copyControlLabel = "#{messages['pick.copyLabel']}"
       removeControlLabel = "#{messages['pick.removeLabel']}" removeAllControlLabel ="#{messages['pick.removeAllLabel']}"
       value="#{templateManager.selectedTemplateFields}" required="true">
       <f:selectItems value="#{templateManager.allFields}" />
       <s:convertEntity />
       </rich:pickList>
      
       </s:decorate>
      </h:panelGrid>
      


      Thank you in advance for your suggestions!
      Regards