Hello,
I have a jsf portlet and facing a small problem.
I have 3 views for my functionality. When I am on 3rd view, there is a button that takes me outside of jsf navigation to some other portal page.
I do it with this snippet:
facesContext.getExternalContext().redirect("<url to some portal page>");
Problem is, when some other navigation flow brings same user to my jsf portlet, it goes directly to 3rd view, skipping first 2 views.
To resolve this, I have following snippet in doView() of my jsf portlet. I use this conditionally of course.
FacesContext ctx = getFacesCTX(request, response);
UIViewRoot newView = ctx
.getApplication()
.getViewHandler()
.createView(ctx,
"/initialView.jsp");
ctx.setViewRoot(newView);
Question is can I get rid of this logic? Is there any better way of doing it?
Thanks,
bchinc