This content has been marked as final.
Show 3 replies
-
1. Re: rerendering a subTable with an ajax request
ronanker May 13, 2008 1:34 PM (in response to ronanker)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 :) -
2. Re: rerendering a subTable with an ajax request
sergeysmirnov May 13, 2008 2:50 PM (in response to ronanker)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. -
3. Re: rerendering a subTable with an ajax request
ronanker May 14, 2008 5:35 AM (in response to ronanker)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.