I have a jsf page (page1.xhtml) where within a form is a "h:datatable" defined and filled with values from database by using hibernate. this is working fine.
Additionally I placed a "h:commandButton" (Create) on the same page. By clicking the button a new jsf page will be opened (page2.xhtml). On the new page I can set values to some h:inputText elements and can save them with a Button "Save" to the database. This is also working fine because I can see the new values in the database table.
The return value of my save method is the name of the jsf page (page1.xhtml) where the dataTable is shown.
The question I have now is how can I update or refresh the dataTable to show, beside the existing values, also the new value? Do I have to read them again from DB?
My ManagedBean is SessionScoped and I'm using JSF 2.2
I checked this http://balusc.blogspot.de/2006/06/using-datatables.html but I was unable to find the corresponding information.
Please, can anyone assist?