a4jRepeat keeptransient false ???
ronanker May 11, 2009 12:39 PMhello !
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);
}
-->
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)