I’m working with richFaces – rich:dataTable.
I need to delete some rows and then show a notification for few seconds as new row (after thead) and then it (row with notification) will disappear.
In JSF I can’t give unique ID or name to my table, so I don’t know how to find it in the DOM. Maybe then I can add some jQuery row code.
As I have stated, you can do something like this:
The HTML rendered would be like
And you can find it in your DOM by using the simplest JS
Also, you can use
<rich:dataTable>tag component instead of<h:dataTable>and there would be no problems.You can “remove” the rows by your own using JavaScript/jQuery or just by removing the items in the list and rerendering the datatable using an
<a4j:commandButton render="dtMyData">(instead of commandbutton you can use<a4j:commandLink>).To show messages to the user after firing an ajax action, you can use this richfaces code: