• 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
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

JSF URL annoyance in JSF 2?

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The most annoying thing I used to deal with in JSF 1.x was when using the JSF navigation... the URL never reflected the page that it was actually on, but the page before.

Has this been fixed in JSF 2?

Thanks!
 
Ranch Hand
Posts: 42
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Don't know whether it has been fixed in jsf2 or not but for jsf 1.x you can fix this by using

before </navigation-case> end tag.
 
author
Posts: 82
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

E Cho wrote:The most annoying thing I used to deal with in JSF 1.x was when using the JSF navigation... the URL never reflected the page that it was actually on, but the page before.

Has this been fixed in JSF 2?



As Mahendra Pratap pointed out, you can use the redirect in your navigation rules, but you can also use implicit navigation. For example, in any ActionSource2 component (h:commandButton, h:commandLink, etc)

You can say <h:commandButton action="next?faces-redirect=true" value="submit" /> and you'll get the redirect. This will cause the POST REDIRECT GET pattern to be followed. I have a big section on this starting on page 123 in the new book. This feature also works well with view parameters.

Ed
 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I also recommend the new <h:link> and <h:button> components to take advantage of JSF2's new simplified navigation system.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic