2 Replies Latest reply on Aug 16, 2010 4:56 AM by Christian Nockemann

    ListShuttle in ModalPanel showing outdated data

    Christian Nockemann Newbie

      Hello everyone,

       

      i'm using a ListShuttle in a ModalPanel and i have the following problem:

       

      every second time i open the modalPanel via Richfaces.showModalPanel() it shows outdated data.

       

      Let me explain this in detail:

       

      I open the modalPanel for the first time. The correct data in the ListShuttle is shown. I select some values from a predefined set and close the panel. The backingObject is populated, everything is fine.

       

      Now i open the ModalPanel with a different backingObject. So different predefined values and no selected values should be seen but i get to see the ModalPanel in the state of the first call (wrong predefined values and the selected values i chose before).

       

      When i close and open the modalPanel again, everything works fine.

       

      I looked into the backingObject during the defective call and it carries the right data. The right getters are called an so on, but wrong data appears on the screen.

       

      This is my code:

       

      JSP:

       

      <rich:modalPanel width="500" height="700" id="katalog" autosized="true">
           <f:facet name="header">
           <h:outputText value="#{analyseBean.currentCatalogDimension}" />
           </f:facet>
           <f:facet name="controls">
           <h:panelGroup>
                <a4j:form id="catHeaderForm" ajaxSubmit="false">
                <rich:componentControl for="katalog" attachTo="hideKatalog"
                     operation="hide" event="onclick" />
                <h:commandLink onclick="Richfaces.hideModalPanel('katalog')">
                     <h:graphicImage value="/img/remove.png" height="13" width="13"
                     styleClass="hidelink" id="hideKatalog" />
                     </h:commandLink>
                </a4j:form>
           </h:panelGroup>
           </f:facet>
           <div id="catDiv">
           <a4j:form id="catForm" ajaxSubmit="false">
                <rich:listShuttle sourceValue="#{analyseBean.catalog.catOptions}"
                targetValue="#{analyseBean.catalog.catTarget}" rowKeyVar="rkv"
                var="option" orderControlsVisible="false"
                fastOrderControlsVisible="false" listsHeight="400">
                     <rich:column id="option">
                          <f:facet name="header">
                               <h:outputText styleClass="headerText" value="Filteroptionen" />
                          </f:facet>
                            <h:outputText value="#{option}" />
                     </rich:column>
                </rich:listShuttle>
                <h:commandButton value="Auswahl übernehmen... "
                style="white-space:nowrap;" action="selectValues" />
           </a4j:form>
           </div>
      </rich:modalPanel>
      

       

      <a4j:commandLink reRender="catDiv" oncomplete="Richfaces.showModalPanel('katalog');"
           style="white-space:nowrap;" action="catalog">
           <h:graphicImage url="img/search.jpg" style="border:none;" />
           <a4j:actionparam assignTo="#{analyseBean.currentCatalogDimension}" name="dim" value="#{dim.key}" />
      </a4j:commandLink>
      

       

       

      I don't think the Bean is important here, because it holds the right data and only has some simple getters.

       

      Can anyone help?