Uploaded image for project: 'PUBLIC - Liferay Faces'
  1. PUBLIC - Liferay Faces
  2. FACES-2951

Add history API support to command components for Ajax Navigation



      When Ajax navigation occurs in JSF, the entire page (or the contents of the portlet) are replaced with the contents of the page that is being navigated to. However, since Ajax is used, the URL is not changed.

      You can view this problem in the jsf-applicant-portlet by filling out and submitting the form. Once the form is submitted the portlet navigates to confirmation.xhtml but the URL is unchanged. If you remove the f:ajax from the h:commandButton which is performing the navigation, you will be able to see the URL that should appear.

      This feature would use the JavaScript History API (if available) to change the browser's url to the new location and push the previous view's url to the "back" queue.

      This feature would need to be opt-in, since it changes the fundamental behavior of Ajax navigation. This feature would need to detect whether the request was an Ajax navigation on the client side. This would likely involve detecting whether the <update> element's id is javax.faces.ViewRoot or javax.faces.ViewBody or the portlet's namespace. See here for an example of how this detection could be done.


          Issue Links



              • Votes:
                0 Vote for this issue
                0 Start watching this issue


                • Created:


                  Version Package