-
1. Re: How to rerender newly added rows in rich:datatable?
ronanker Jan 27, 2010 3:05 AM (in response to littlealan)hi Alan,
Unfortunately, there is no way to add new row with ajax. As the 'rerender' process is just able to *replace* some node in the DOM tree.
-
2. Re: How to rerender newly added rows in rich:datatable?
littlealan Jan 27, 2010 5:03 AM (in response to ronanker)Okay, actually I'm also tried NOT to rerender anything, then the response XML is clean. But to sync the component tree in server, I still call the action e.g. action="#{testBean.addrow)" to add an element into the datatable list.
But how to add the row to the html table? I tried to use call javascript like jQuery during "oncomplete" event of the ajax command button, to clone a new row, but is there any good way to update the increment the id field of the DOM elements? you know the id inside table would usually be: form:panel:table:0:field1, i don't know if there is any good way to generalize the replace id in a javascript function.
Regards,
Alan
-
3. Re: How to rerender newly added rows in rich:datatable?
littlealan Feb 8, 2010 1:39 PM (in response to littlealan)So is there any other suggestions? how to clone a row in javascript and systematically replace the correct JSF generated ids? Or should I request this feature and let us vote?
Alan
-
4. Re: How to rerender newly added rows in rich:datatable?
ronanker Feb 8, 2010 5:05 PM (in response to littlealan)I don't know if richfaces 4 / jsf 2 will help in doing what you want...
other suggestion but maybe too difficult and i think wothless : add a special filter that reduce the response to just what you need and adapt the javascript to be able to interpret the response of your filter... good luck.
-
5. Re: How to rerender newly added rows in rich:datatable?
ilya_shaikovsky Feb 9, 2010 5:26 AM (in response to ronanker)yes, support of such cases now under discussions for 4.x