I am in a situation where I need to implement a redirect from the construtor of a managedBean.
For instance : Page 1
: Has a Name Search feature. Search results navigate to Page 2. Page 2
: Has Extra information about the name based on DB querries from the DB in the page constructor. To Load data requried to display in Page2. There are hyperlinks on each information on this page that goes to the third Page. Once the information is worked, the related information linked to the name is removed from the DB and I will navigate to Page 2.
The problem that I am not able to resolve is, in the construtor of Page 2 when the DB queries donot return any more information on the name, I need to directly go to Page 1. How can I redirect from the contructor of the second page's specific backing bean.
I tried using Navigation Handler, and setting specific rootView in context. Netiher works when called from the constructor.
If I implement the PhaseListener, then would the pahse Listener logic be applied to all the other pages in the application ?
- Brain Fried.