>From: "Ryan Wynn" <[EMAIL PROTECTED]> > > On 4/18/06, Richard Wallace wrote: > > The problem I'm running into is that when next or previous are clicked, > > instead of the content for the next page being displayed,the content > > from the first page is always displayed. I've checked by logic and made > > sure the the value of [EMAIL PROTECTED] is what it > > should be. The problem looks like the method getCurrentPage() is never > > even called when the next/prev links are hit. I'm guessing it's because > > clay is caching the results from the first time the page is loaded and > > then just using that on subsequent requests. > > > Richard, > > I was able to accomplish something similiar to what you are describing > but I had to have clay re-create the view on next/back. > > protected void navigate(String viewId) { > UIViewRoot newView = FacesContext.getCurrentInstance().getApplication() > > .getViewHandler().createView(FacesContext.getCurrentInstance(),viewId); > FacesContext.getCurrentInstance().setViewRoot(newView); > } >
That's a nifty trick. I would have setup navigation rules but that's more dynamic. > I'll defer to Gary on whether or not this is required. > I agree. It sounds like the component tree needs to be recreated. Clay will rebuild the component tree only when the view is created. Otherwise, you would need to use a rendered value binding. > Ryan Gary