I have sth like this:
<a4j:repeat value="#{results}" var="hdr" rowKeyVar="idx">
<rich:dataTable var="item" value="#{results}" id="tbl#{idx}" first="#{idx}" rows="1">
<a4j:commandButton value="update this table only" reRender="tbl#{idx}" />
</rich:dataTable>
</a4j:repeat>
When I check from the output html, the data table has id like form:0:tbl that has no idx at the end.
The reRender will work when there is only one row in the results.
So here comes some questions:
- Why doesn't dataTable's id works with EL expression while the "first" attribute works nicely?
- How does reRender work that even I just specify tbl it can still be resolved while the actual HTML id is something longer like form:0:tbl? (if I know how does reRender work, I maybe able to hack it to work with a4j:repeat...)
- Is there any technique or workaround that I could use to refresh only a specific dataTable that is inside a4j:repeat?
In fact I have successfully reRendered the whole a4j:repeat block surrounded by s:div. But refreshing the whole block would reset the scrollbar so it isn't desired....