incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gvanma...@comcast.net (Gary VanMatre)
Subject Re: Dynamic Navigation
Date Tue, 03 Apr 2007 01:29:16 GMT
>From: "Justin Mckay" <justin.mckay@famis.com> 
>
> Hi all, 
> 
> 
> 
> I am in the process of moving our project from Oracle's ADF to Trinidad. 
> One thing we are having a problem with is dynamic navigation from a 
> ValueChangeEvent(selectOneChoice). This did work with Oracle's ADF but is 
> not working now. It seems like the page is created(backing beans are called 
> and the page seems to be generated), we are just not actually moving to that 
> page. One thing to note is this code does work from an ActionEvent(Button 
> or Link). Any ideas or other strategies to consider? 
> 
> 
> 
> String path = "/misc/finder.xhtml"; 
> 
> FacesContext fContext = FacesContext.getCurrentInstance(); 
> 
> ViewHandler vh = fContext.getApplication().getViewHandler(); 
> 
> UIViewRoot uroot = vh.createView(fContext, path); 
> 
> fContext.setViewRoot(uroot); 
> 
>

I've seen something that sounds similar but I'm not sure if it's your problem.  I had client
side state saving turned on. This meant that the saved state was in the request from the previous
submit. I was using an external context dispatch instead of swapping the view root.  The dispatch
keeps the request scope (forward) the same as swapping the view root.  The Trinidad state
manager was restoring the view from the state captured from the previous submit.  It was not
comparing the viewid of the restored view to the current view.  I submitted a patch for this
one but I've since lost track of it's status.

Something else you might try is invoking the renderResponse after swapping the 
view root.

FacesContext fContext = FacesContext.getCurrentInstance();  

FContext.responseComplete();
ViewHandler vh = fContext.getApplication().getViewHandler(); 
 UIViewRoot uroot = vh.createView(fContext, path); 
 fContext.setViewRoot(uroot); 
fContext.renderResponse();


 
> 
> Justin McKay 
>

Gary

 
> Java Developer 
> 
> FAMIS Software, Inc. 
> 
> 
> 
> justin.mckay@famis.com 
> 
> 
> 
> (949) 553-6564 telephone 
> 
> (949) 553-6559 fax 
> 
> 
> 
> http://www.famis.com 
> 
> 
> 
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message