1 Reply Latest reply on Jun 22, 2007 12:50 PM by Sergey Smirnov

    Ajax4jsf rerendering a datatable from a popup window command

    Boubou CAMARA Newbie

      Hello there,
      I am facing a rerendering problem in the following scenario, any help/hint is welcome :

      mainpage.faces code snippet
      _________________________

      <a4j:outputPanel id="panelpricingOverrideByCurrencyTable">
       <t:panelGrid cellspacing="1" cellpadding="0" width="100%" columns="7" rendered="#{pricingBackingBean.beanID == 'floatingInterestRatesNonMajor'}">
       <t:panelGroup styleClass="panelGroupCenteredStyle">
       <t:dataTable id="pricingOverrideByCurrencyTable" value="#{pricingCtrl.backingBean.OverrideCurrenciesData}" var="currentRow" width="100%" styleClass="tableWithTieredSpreadValueStyle" headerClass="tableHeaderBackground" forceId="true">
       <t:column styleClass="centred_column_base_rates">
       <f:facet name="header"><t:outputText styleClass="text" value="CUR"/></f:facet>
       <t:outputText styleClass="fieldValueStyle" value="#{currentRow.ccy}"></t:outputText>
       </t:column>
       <t:column styleClass="centred_column_base_rates">
       <f:facet name="header"><t:outputText styleClass="text" value="Calc. Rule"/></f:facet>
       <t:outputText styleClass="fieldValueStyle" value="#{currentRow.pricingRule}"></t:outputText>
       </t:column>
       <t:column styleClass="centred_column_base_rates">
       <f:facet name="header"><t:outputText styleClass="text" value="Int. Basis"/></f:facet>
       <t:outputText styleClass="fieldValueStyle" value="#{currentRow.intCalcBasis}"></t:outputText>
       </t:column>
       <t:column styleClass="centred_column_base_rates">
       <f:facet name="header"><t:outputText styleClass="text" value="Effective Date"/></f:facet>
       <t:outputText styleClass="fieldValueStyle" value="#{currentRow.effDate}"></t:outputText>
       </t:column>
       <t:column styleClass="centred_column_base_rates">
       <f:facet name="header"><t:outputText styleClass="text" value="Debit Base Rate"/></f:facet>
       <t:outputText styleClass="fieldValueStyle" value="#{currentRow.baseRateCodeDr}"></t:outputText>
       </t:column>
       <t:column styleClass="centred_column_base_rates">
       <f:facet name="header"><t:outputText styleClass="text" value="Credit Base Rate"/></f:facet>
       <t:outputText styleClass="fieldValueStyle" value="#{currentRow.baseRateCodeCr}"></t:outputText>
       </t:column>
       <t:column styleClass="centred_column_base_rates">
       <a4j:commandLink value="#{msgs.m_common_update}" onclick="fireDHTMLWindow('/myproject/pages/overrideCurrency.faces?phaseInitController=pricingCtrl&phaseInitMode=UC¤cy=#{currentRow.ccy}',550,600); return false"/>
       </t:column>
       </t:dataTable>
       </t:panelGroup>
       </t:panelGrid>
       </a4j:outputPanel>


      popup window page snippet : overrideCurrency.jsp
      ____________________________________
      <t:panelGroup style="align:center; width:100%;" rendered="#{pricingCtrl.pricingOverrideByCcyBackingBean.updateMode}">
       <a4j:commandButton styleClass="smallBlueButton" id="applyPricingButtonOverrideCcy"
       value="Apply Pricing"
       actionListener="#{pricingCtrl.applyPricingOverride}"
       reRender="panelpricingOverrideByCurrencyTable">
       <a4j:ajaxListener type="org.ajax4jsf.ajax.ForceRender" /> </a4j:commandButton>
      </t:panelGroup>


      the actionLister pricingCtrl.applyPricingOverride modifies the collection pricingCtrl.backingBean.OverrideCurrenciesData . What i wanted is to rerender the parent datatable container : panelpricingOverrideByCurrencyTable.
      Thanks for your help.