How to achieve partial navigation in JSF2 and Primefaces 2?

Here is an example: Managed-bean: @ManagedBean @ViewScoped public class PartialNavBean { private String pageName = "/pages/group_member"; public String getPageName() { return pageName; } public void setPageName(String pageName) { this. PageName = pageName; } } View: Update: I tried with the following: public String getPageName() { System.out. Println(Thread.currentThread().getStackTrace()1); System.out.

Println(FacesContext. GetCurrentInstance(). GetCurrentPhaseId()); return pageName; } public void setPageName(String pageName) { System.out.

Println(Thread.currentThread().getStackTrace()1); System.out. Println(FacesContext. GetCurrentInstance().

GetCurrentPhaseId()); this. PageName = pageName; } And the output is as follows: INFO: pkg.PartialNavBean. GetPageName(PartialNavBean.

Java:14) INFO: RESTORE_VIEW 1 INFO: pkg.PartialNavBean. SetPageName(PartialNavBean. Java:20) INFO: INVOKE_APPLICATION 5 INFO: pkg.PartialNavBean.

GetPageName(PartialNavBean. Java:14) INFO: RENDER_RESPONSE 6 INFO: pkg.PartialNavBean. GetPageName(PartialNavBean.

Java:14) INFO: RESTORE_VIEW 1 INFO: pkg.PartialNavBean. SetPageName(PartialNavBean. Java:20) INFO: INVOKE_APPLICATION 5 INFO: pkg.PartialNavBean.

GetPageName(PartialNavBean. Java:14) INFO: RENDER_RESPONSE 6.

Thanks Bhesh for the example but it has the same problem as I pointed out in the link. The page is only refreshed after the second click. If you trace you app you will notice that getPageName is called before setPageName after a link is clicked.

– WuR Oct 27 at 16:43 @WuR: I have tried it already and it works as it supposed to. SetPageName is called during the Invoke Application phase and getPageName during the Render Response phase. I don't why it's not working in your case.

Try adding immediate="true" for both the links. – gurung Oct 27 at 16:58 @WuR: See the update. You can try with that to see why it's supposed to work.

– gurung Oct 27 at 17:08 I tried adding immediate=true but no effect. I attached a phased listener to get a clear picture where these methods are being called so following sequence show at what stage the methods are being called. START PHASE RESTORE_VIEW(1) **GetCurrentPage(PanelMenu.

Java:14) RESTORE_VIEW(1) END PHASE RESTORE_VIEW(1) START PHASE APPLY_REQUEST_VALUES(2) PanelMenu. SetCurrentPage(PanelMenu. Java:20) APPLY_REQUEST_VALUES(2) END PHASE APPLY_REQUEST_VALUES(2) START PHASE RENDER_RESPONSE(6) END PHASE RENDER_RESPONSE(6) – WuR Oct 27 at 17:30.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions