Hi Everyone
We are having an issue in JSF.We are developing a web application using RAD(Rational Application developer).Application server used is WAS.
The
JSF implementation is jsf-ibm.jar
The scenario is as follows:-
On the homepage (The first page of the application) we need to fetch the data from the database. For which we use the prerender attribute of hx:scriptcollector tag. In the onloadPageBegin method of the managed bean we are making a database call.Now in the exception block we want to add a message to the facescontext and forward (cannot do a redirect as want to maintain the faces message and avoid putting the message in the session because we are not forcing the user to keep session) the user to customer_help.jsf page.
How will I be able to do that?
Follwing things were tried by me but didn't seem to find any solution:
1) facesContext.getExternalContext().dispatch("/customerhelp.jsf") - It does not work because by the time it reach the exception block it is already in the reder response phase.
2) It would be possible if somehow we could change the viewroot of the page. Tried using a phaseListener but was not able to still acheieve the desired result.
Can you please give us your views on the same.