File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes JSF URL annoyance in JSF 2? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "JSF URL annoyance in JSF 2?" Watch "JSF URL annoyance in JSF 2?" New topic
Author

JSF URL annoyance in JSF 2?

E Cho
Greenhorn

Joined: Apr 24, 2009
Posts: 9
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!
Mahendra Pratap
Ranch Hand

Joined: Feb 25, 2008
Posts: 42

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.


Mahendra
http://randomtechieblog.blogspot.com
Ed Burns
author
Ranch Hand

Joined: Sep 11, 2006
Posts: 82
    
    5
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
Lincoln Baxter
Greenhorn

Joined: Aug 25, 2008
Posts: 24
I also recommend the new <h:link> and <h:button> components to take advantage of JSF2's new simplified navigation system.


Lincoln Baxter, III | [url]http://ocpsoft.com/[/url] | Creator of: PrettyFaces - Bookmarks, Navigation, and Dynamic Parameters for JSF
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSF URL annoyance in JSF 2?
 
Similar Threads
Displaying an image BLOB in my JSF page
How to get session scope backbean
test.jsf works test.jsp doesn't
jsf urls
Websphere Portal navigation