0 Replies Latest reply on May 11, 2009 12:39 PM by ronanker

    a4jRepeat keeptransient false ???

    ronanker

      hello !

      i just had an issue with the code when ajax rerender the parent form :

      <a4j:repeat id="cat"
       value="#{ressourcesHandler.budgets.detailListe}"
       var="ligneCategorie"
       rendered="#{ressourcesHandler.ongletSelectionne == 'ong_saisir'}"
       rowKeyVar="rowCat">
      
       <rich:dataTable ...
       </rich:dataTable>
      
       <script type="text/javascript"><!--
       function onModificationValeur<h:outputText value="#{rowCat}" />(value, idProjet, idPhase, idColonne, columnsToReRender, rowPrj, rowPhase){
       ...
       _onModificationValeur<h:outputText value="#{rowCat}" />(value, idProjet, idPhase, idColonne, columnsToReRender, rowPrj, rowPhase);
       }
       --></script>
      
       <a4j:jsFunction name="_onModificationValeur#{rowCat}"
       action="#{ressourcesHandler.onModificationValeur}"
       reRender="#{ressourcesHandler.columnsToReRender}">
       ...
       </a4j:jsFunction>
      
      </a4j:repeat>


      after renrender the resulting html code for the script tag is :
      <script type="text/javascript">
       function onModificationValeurImputation<script type="text/javascript"><!--
       function onModificationValeurImputation0(value, idProjet, idPhase, idColonne, columnsToReRender, rowPrj, rowPhase){
       ...
       _onModificationValeurImputation0(value, idProjet, idPhase, idColonne, columnsToReRender, rowPrj, rowPhase);
       }
       </script>
      
       (value, idProjet, idPhase, idColonne, columnsToReRender, rowPrj, rowPhase);
       }
       --&gt;
      

      looks like the "keeptransient" is false...

      I solve this by changing to this :
      <a4j:repeat id="cat"
       value="#{ressourcesHandler.budgets.detailListe}"
       var="ligneCategorie"
       rendered="#{ressourcesHandler.ongletSelectionne == 'ong_saisir'}"
       rowKeyVar="rowCat">
      
       <rich:dataTable ...
       </rich:dataTable>
       <a4j:outputPanel layout="none" keepTransient="true">
       <script type="text/javascript"><!--
       function onModificationValeur<h:outputText value="#{rowCat}" />(value, idProjet, idPhase, idColonne, columnsToReRender, rowPrj, rowPhase){
       ...
       _onModificationValeur<h:outputText value="#{rowCat}" />(value, idProjet, idPhase, idColonne, columnsToReRender, rowPrj, rowPhase);
       }
       --></script>
       </a4j:outputPanel>
       <a4j:jsFunction name="_onModificationValeur#{rowCat}"
       action="#{ressourcesHandler.onModificationValeur}"
       reRender="#{ressourcesHandler.columnsToReRender}">
       ...
       </a4j:jsFunction>
      
      </a4j:repeat>


      i let you judge if it's a bug...
      (richfaces 3.3.0)