-
1. Re: rich:tree page-navigation using nodeSelectListener event
ilya_shaikovsky Aug 20, 2009 10:14 AM (in response to sait)check tree drag and drop demo at richfaces-demo. It not change actual page at details pane but works similar to it. Just populate needed content and reREnder details pane as there.
Or you talking about real JSF navigation? -
2. Re: rich:tree page-navigation using nodeSelectListener event
sait Aug 20, 2009 11:31 AM (in response to sait)Thanx for your reply.
I am currently using Seam 2.1.1.GA . I need a solution that can change actual page. reRendering components at the same page does not make any sense. -
4. Re: rich:tree page-navigation using nodeSelectListener event
sait Aug 21, 2009 2:28 AM (in response to sait)Using ExternalContext redirection solved my problem :)
Look at the method below (http://download.oracle.com/docs/cd/E12839_01/webcenter.1111/e10148/jpsdg_page_service.htm) to see the solution way/* This method is prioritized and executed even when there are other go() methods without arguments. */ public void go(String newPagePath) { System.out.println("go(String newPagePath) method with parameter executed."); try { FacesContext context = FacesContext.getCurrentInstance(); String viewID = context.getViewRoot().getViewId(); System.out.println("ViewID=" + viewID); ExternalContext extCtx = context.getExternalContext(); String targetURI = extCtx.getRequestContextPath() + "/faces" + viewID; System.out.println("Navigate to: " + targetURI); extCtx.redirect(targetURI); context.responseComplete(); } catch (Exception ee) { System.out.println("Error: " + ee.toString()); } }
Mustafa Sait OZEN -
5. Re: rich:tree page-navigation using nodeSelectListener event
nbelaevski Aug 21, 2009 6:07 AM (in response to sait)Mustafa,
I guess two minor changes should be done:
- remove newPagePath cause it never used
- there's a bunch of method in ExternalContext to encode URI - you can use it instead of using hardcoded "/faces" path -
6. Re: rich:tree page-navigation using nodeSelectListener event
sait Aug 21, 2009 6:59 AM (in response to sait)I did not use exactly the same code. I wrote the code because it can give idea. Thanx for your suggest :)
Mustafa Sait Ozen -
7. Re: rich:tree page-navigation using nodeSelectListener event
nbelaevski Aug 21, 2009 2:31 PM (in response to sait)I see. Just wanted to leave a note for everyone who would like to reuse the code by 1:1 copy-pasting.