• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

question about how page navigation should be handled

 
Village Idiot
Posts: 484
jQuery Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Saloon Keeper
Posts: 27764
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic