aspose file tools*
The moose likes JSF and the fly likes question about how page navigation should be handled Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "question about how page navigation should be handled" Watch "question about how page navigation should be handled" New topic
Author

question about how page navigation should be handled

Matt Kohanek
Village Idiot
Ranch Hand

Joined: Apr 04, 2009
Posts: 483

I am going to have multiple pages with three content panes - a project explorer on the left, some horizontal tabs along the top, and the rest of the screen is the majority, and will be the main content pane. So the only thing that will change is going to be this main content pane (which is determined by what the user clicks on from the project explorer or tabs). The project explorer and tabs are going to be the same across the different pages (although project explorer does change depending on the user, and as the user adds new projects etc)

So lets say when a user first logs in he sees the default view, lets call it www.mdn.com/index.jsf. Then this user clicks on one of the tabs, which changes only that main content pane. Is/should this change the actual url, or will it be considered the same url, and it is just that the page changes dynamically? In other words, when this main content pane changes will the url still be www.mdn.com/index.jsf? Or would it change to something like www.mdn.com/tab_one.jsf?

If both are possible which is recommended? Which would save more memory? I do know we will need at least some unique urls, but not all of it needs to be unique.


True wisdom is in knowing you know nothing - Socrates
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16137
    
  21

URLs in JSF are relatively meaningless. It's a major complaint, since you can't bookmark or favorite them. A JSF URL is more like a handle on a conversation than it is an actual web request. You can initially request a page with a URL, but after that, the form editing is managed by a set of postbacks, and if you'll notice, often the original URL is still displayed in your browser even after the actual page content has shifted to a different JSF form entirely.

Adding better support for URL-based navigation is one of the goals of JSF 2.0. In the mean time, when you need an actual bookmarkable URL, consider using PrettyFaces. It's a fairly simple way to make bookmarkable URLs and as a side benefit also allows the processing of JSF HTTP Get Requests without you having to write explicit code burrrowing into FacesContext just to get the URL parameters.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: question about how page navigation should be handled