I have a userList page, which lists all of my users. You can click a user, then edit & save them.
I have an add/edit user page, which does just that. When you save the add/edit, you are forwarded to a confirmation page.
I am trying to figure out how:
When someone clicks the save
If they came from the userList page, send them back.
If they came from anywhere else, send them to the confirmation page.
The save button is linked to a method in my stateful bean, userEntryBean.
Maybe I can ask, how, in my code, can I see where the person navigated from.
Joined: Apr 09, 2009
A simple approach would be to set a boolean value in a bean and based on the value you can redirect, it can be set to 'true' when navigating from userList page.
You can refer the API,org.jboss.seam.faces.Redirect -> Redirect.instance().captureCurrentView();
and you'll have to make corresponding navigational entries in pages.xml.