1 Reply Latest reply on Jan 11, 2010 5:58 PM by Nick Belaevski

    listShuttle/picklist and modalPanel issue.

    Mariano Arg Newbie

      Hi all, I'm having a problem with listShuttle / pickList when the components are rendered in a modalPanel.

      I'm using 3.3.2 version.


      The problem is that when the modalPanel is closed, the action of the button that triggers the "hidemodalpanel" script is being called before the targetValue is being updated with the selected input.


      Probably this sentece only make sense to me... Here's some code



                  <rich:modalPanel id="myPanel" width="675" height="300">
                      <f:facet name="header">
                              <h:outputText value="Panel Title"></h:outputText>


                          <rich:listShuttle id="entityList" sourceValue="#{bean.availableEntities}"
                              targetValue="#{bean.selectedEntities}" var="entity"
                              listsHeight="200" sourceListWidth="300" targetListWidth="300"
                                  <h:outputText value="#{entity.name}"></h:outputText>
                      <a4j:commandButton id="closeButton" value="Ok" type="submit"
                           <rich:componentControl for="myPanel" attachTo="closeButton" operation="hide" event="onclick"/>

                      <a4j:commandButton value="Back"
                           type="reset" immediate="true" oncomplete="Richfaces.hideModalPanel('myPanel')"/>




      The method bean.refreshEntities is being invoked as expected, but if I do a sysout of bean.selectedEntities, I do not see the updated value but the old one. After the modalPanel is closed and the action invoked has finished the collection bean.selectedEntities is updated.


      I tried with pickList, closing the modalPanel with rich:componentControl, using f:setPropertyListener, etc...


      what am I doing wrong?