This content has been marked as final.
Show 3 replies
-
1. Re: how to get dynamic values for reRender in a4j
sergeysmirnov May 8, 2007 6:47 PM (in response to meenak)I am not sure I understand the question right. Yes, you can use EL in the reRender and assign the value anywhere prior the RENDER RESPONSE phase.
The potential problem I see in your code is not about the reRender itself, but about rendered attribute on the textarea.
Try to avoid pointing with reRender to the components that has 'rendered' attribute. As an alternative, you can surround such component with < a4j: outputpanel layout="none" > -
2. Re: how to get dynamic values for reRender in a4j
mglowacki May 9, 2007 4:54 AM (in response to meenak)Sorry, I don't get it. I've tried:
<a4j:log/> <a4j:poll action="#{bean.updateStats2}" immediate="true" interval="5000" reRender="gamesRow"/> <h:panelGrid> <a4j:repeat binding="#{bean.gamesRepeat}" id="gamesRow" value="#{bean.gamesIt}" var="games_it" ajaxKeys="#{bean.ajaxedRowsSet}"> <h:panelGrid columns="2"> <h:panelGrid> <h:outputText id="valA" value="#{games_it.valA}"/> <h:outputText id="valB" value="#{games_it.valB}"/> </h:panelGrid> <h:panelGrid> <h:outputText id="valC" value="#{games_it.valC}"/> <h:outputText binding="#{bean.valDText}" id="valDText" value="#{games_it.valD}"/> </h:panelGrid> </h:panelGrid> </a4j:repeat> </h:panelGrid>
public List ajaxedRowsSet() { ListDataModel model = (ListDataModel)gamesRepeat.getValue(); TempModel row = null; int rows = model.getRowCount(); List list = new ArrayList(); for(int i=0;i<rows;i++) { model.setRowIndex(i); row = (TempModel)model.getRowData(); System.out.println("id: " + valDText.getId()); list.add(valDText.getId()); } return list; }
buit nothing happens. And Log4j shows this error
error[10:53:38,250]: New node for ID main:gamesRow is not present in response
Looks like method for getting ids is not even invoked. -
3. Re: how to get dynamic values for reRender in a4j
mglowacki May 9, 2007 5:41 AM (in response to meenak)sorry, I have posted my message in wrong thread... ;)