Anyone have an idea how to rerender a subtable ?
I tried to rerender all the master datatable but in this case, at each ajax update I lose the focus that should be set on inputs in the master datatable.
It is not really user friendly :)
subTable should be a direct child of table, not column.
It start with . So, it you put it inside the column (td) it will be invalid structure. You need to use the table there instead of subTable.
Focus is lost if you re-render the focused component itself. 'focus' attribute helps to set it abck, but the position of the cursor will be lost. So, try to avoid rerender itself.
Thanks for the reply,
In fact I have two subtables, the first one is in the header of the master datatable and the second below column tags:
<rich:datatable> <f:facet name="header"> <rich:subTable id="grandtotal"> ... </rich:subTable> </f:facet> <rich:column> ... <%-- some code with inputs --%> <a4j:support event="onchange" rerender="total, grandtotal, theRowTotalColumnId" /> ... </rich:column> <rich:subTable id="total"> ... some stuff in the subtable </rich:subTable> ... <rich:datatable>
The whole page is generated as expected and works fine. My only problem is that I'm not able to rerender the subtable (grandtotal) when "onchange" event is fired.
About the focus, I understand the limitation.