| Author |
refresh data in session jsf2, primeface
|
doinigly jaquel
Greenhorn
Joined: Aug 08, 2012
Posts: 6
|
|
I have two xhtml pages : the first allow to store new order, the second allow to list all of orders stored in the database.
For specific purposes, I have sessionManeged in the second page and the problem is when I save a new order and I go in the second page it doesn't get refresh because data are stored in sessions.
Can you suggest me a method to refresh data (re_run query to database) when a new order is stored?
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14573
|
|
The standard JSF navigation mechanism is designed to do that. Inject the backing bean for the second page into the backing bean for the first page as a Managed Property.
When the action method for the first page is invoked in the backing bean for the first page, have that backing bean invoke a setup method in the second bean. That setup method can then fetch the data.
When the action method returns to the JSF Controller with the navigation rule, the second page will be displayed and its backing bean will contain the desired values.
|
Customer surveys are for companies who didn't pay proper attention to begin with.
|
 |
 |
|
|
subject: refresh data in session jsf2, primeface
|
|
|