Oh Ok! I just figured I was doing something incorrect!

Simon Kitching wrote:
Kevin Gutch wrote:
Whenever I click on a commandlink, my navigation is successful but the address in my address bar is always one page behind my current view.

Yep, that's a well known issue. It's caused by the fact that JSF uses internal forwards a lot. When the browser POSTs data to /foo.jsf the server-side code can decide to render page /bar.jsf back to the user. However what the browser sees is that it POSTed to /foo.jsf and got back some content. It doesn't know that the content was generated by page /bar.jsp.

A solution is to mark your JSF navigation rules with "<redirect/>". When the code handling the POST decides to navigate to bar.jsp it will then send an HTTP redirect message back to the browser telling it to fetch bar.jsp, which fixes the problem. However that has a number of drawbacks, of which performance is one.

Note that this isn't really a JSF issue as such, more a problem with any framework that uses "forwards" within the server. I don't know PHP or ruby-on-rails or Tapestry but would expect them all to have exactly the same issue.

What is really needed is some extension to HTTP to allow the served page to tell the browser what to display as the page url. However that may be undesirable for security reasons..


Regards,

Simon


--

*Kevin Gutch*
*Protech Products, Inc*.
407.328.5300, ext. 102
407.328.5250 (fax)


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to