The Artima Developer Community
Sponsored Link

Agile Buzz Forum
Page URLs in JSF Applications

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Dominik Wei-Fieg

Posts: 60
Nickname: dominikwei
Registered: Aug, 2005

Dominik Wei-Fieg is a software developer living and working in Freiburg, Germany
Page URLs in JSF Applications Posted: Jan 5, 2007 8:54 AM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by Dominik Wei-Fieg.
Original Post: Page URLs in JSF Applications
Feed Title: Ars Subtilior
Feed URL: http://typo.ars-subtilior.com/articles.rss
Feed Description: Finest Handmade Code Random thoughts about agile software development as an art
Latest Agile Buzz Posts
Latest Agile Buzz Posts by Dominik Wei-Fieg
Latest Posts From Ars Subtilior

Advertisement

Is it just me, or is the following behavior annoying others as well?

I’ve been playing around with JSF lately and noticed that the URLs displayed by the browser and the pages shown don’t match.

The minimal setup I used was a page which lists all users and a page which displays the details for an user named, respectively, users/list.jsf and users/details.jsf.

The navigation part of the xml configuration I’m forced to write for that trivial application looks like:

<navigation-rule>
  <from-page-id>/users/list.jsf</from-page-id>
  <navigation-case>
    <from-outcome>success</from-outcome>
    <to-view-id>/users/details.jsf</to-view-id>
  </navigation-case>      
</navigation-rule>
<navigation-rule>
  <from-page-id>/users/details.jsf</from-page-id>
  <navigation-case>
    <from-outcome>success</from-outcome>
    <to-view-id>/users/list.jsf</to-view-id>
  </navigation-case>      
</navigation-rule>

When I navigate to /users/list.jsf the list page is shown as expected. Once I select an entry I get served the details page. Sounds OK, but the browser is still showing /users/list.jsf as URL. And when I use a link on the details page to go back to the list page, the list page gets displayed again. That is fine as well. But now the browser shows /users/details.jsf as URL.

I’ve tested this with not only list and details, but the whole bunch of CRUD pages for Users, and the behavior is consistent. Consistently wrong.

Am I missing a point here?

Somehow I’m used to having some kind of relation between the URL shown by the browser and the page displayed. As I’m typing this, e. g., the URL shown is typo/admin/content/new and not typo/admin/content (which would have been the overview page). Now I have written and used my part of Java web applications, and often the URL shown by the browser was totally useless, but even that is an better behavior than having the wrong URL shown to you.

And it seems like I’m not doing everything wrong. Just checkout the URLs shown in Figures 4 & 5 of http://www-128.ibm.com/developerworks/java/library/j-jsf2/index.html. The same behavior over again.

And I haven’t even started to talk about the fact that, even if the right URL were shown for the details page, I could not bookmark it, because it carries no information about the user whose details I’m viewing at the moment.

Seems like I’m already spoiled by rails…

Read: Page URLs in JSF Applications

Topic: Things to do in 2007 (Part 1) Previous Topic   Next Topic Topic: End of the Holidays Letdown

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use