0 Replies Latest reply on Jul 31, 2008 12:09 PM by bigevilfish

    rich:modalPanel, Modal window is being reRendered before the

    bigevilfish

      Hi,

      We have a modal window which are populating with data from a model object, the model object is populated when we call an action this is processed by spring and updates the model.

      When we call the method the model is being updated, however the modal window is being reRendered before the spring model is repopulated and therefpre shows the old results not the new ones.

      I've attached the code below for the window, and the webflow config.

      <rich:modalPanel id="advertiserSearch" minHeight="300" minWidth="450" height="300" width="500" keepVisualState="#{displayAdvertiserSearchPopup}">
      
       <f:facet name="header">
       <h:outputText value="Search for Advertiser" />
       </f:facet>
      
       <h:form id="popupAdvertiserForm">
      
       <h:inputText id="searchTxt" value="#{bookingSearchModel.advertiserSearchString}" maxlength="30" onkeyup="javascript: detectEvent(event,'doPopupAdvertiserSearch');">
      
       </h:inputText>
      
       <a4j:jsFunction name="doPopupAdvertiserSearch" reRender="#{flowRenderFragments}" action="doPopupAdvertiserSearch" oncomplete="document.getElementById('popupAdvertiserForm:searchTxt').focus();"/>
      
       <rich:scrollableDataTable id="searchResults" rowKeyVar="rkv" height="150px"
       width="300px" rows="10"
       value="#{advertiserSearchResults}"
       var="result" sortMode="single">
       <rich:column sortBy="#{result.matchedValue}">
       <f:facet name="header">
       <h:outputText value="Name"/>
       </f:facet>
       <a href="#" onClick="javascript: processAdvertiserSelectJS('#{result.matchedValue}','#{result.qualifiedString}')">
       <h:outputText value="#{result.matchedValue}"/>
       </a>
       </rich:column>
       <rich:column sortBy="#{result.qualifiedString}">
       <f:facet name="header">
       <h:outputText value="Type"/>
       </f:facet>
       <A HREF="#" onClick="javascript: processAdvertiserSelectJS('#{result.matchedValue}','#{result.qualifiedString}')">
       <h:outputText value="#{result.qualifiedString}"/>
       </A>
       </rich:column>
       </rich:scrollableDataTable>
      
       <a4j:jsFunction name="processAdvertiserSelectJS" reRender="#{flowRenderFragments}" action="doPopupAdvertiserSelect">
       <a4j:actionparam name="param1" assignTo="#{bookingSearchModel.advertiserName}"/>
       <a4j:actionparam name="param2" assignTo="#{bookingSearchModel.advSearchSelectedResultType}"/>
       </a4j:jsFunction>
      </h:form>
      


      Spring config

      <transition on="doPopupAdvertiserSearch" to="enterBookingDetail" >
       <evaluate expression="advertiserSearchControllerBean.searchOnAdvertiserOrBrandName(bookingSearchModel.advertiserSearchString)"
       result="flowScope.advertiserSearchResults"/>
       <render fragments="popupAdvertiserForm:searchResults"/>
       </transition>