JSF:When user clicks the browser back button,then the current page will refresh.
Applications Description: The multiple JSF 2.0 applications are integrated with my project and these JSF applications are using SAVING METHOD = Server.
Requirement: Whenever a user clicks the browser back button, then the JSF applications current page will get refreshed, Rather than control transfers back to the previous page and the pervious page content gets displayed.
Using java script code, the browser back button check is performed. Whenever the page is opened using browser back button, then this page request is forwarded to the page (from where user had clicked browser back button) using java script history object like window.history.forward()
Scenario Failed: The JSF application contains 5 steps wizard (Please refer the below flow)
1st page inputs --> 2nd page display and 2nd page inputs--> 3rd page display and 3rd page inputs-- .....--> final display page.
Each page display is dependent on the earlier pages input values which are filled up by the user.
If user clicks browsers back button from 2nd page, 3rd page and last page, then the control transfers to its immediate previous page (1st, 2nd and the second last page- as per the above flow). Using the above java script methodology, the browser back button request is identified and handled. That request is forwarded to the same page (From where user had clicked the browser back button: 2nd page, 3rd page and second last page) using java script history object ”window.history.forward()”.
But this approach is not maintained the current page state. The Page state means the current page has 3 fields like name, location and arrival time. These filed values are dependent on the previous page(input values). When user clicks browsers back button, then these fields’ values gets blank.
Kindly guide how to handle and modify the browser back button as per the above requirement.
What do you have that isn't working?
I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
Please use [Code]your code goes in here[/Code] tags when posting code.
Before posting your question, did you look here
Got a question on Linux? Visit our Linux sister site.
Modifications Required For VB6 Apps To Work On Vista
By izza_azhar in forum ASP.NET
Last Post: 04-14-2006, 11:45 PM
By Jason Salas in forum ASP.NET
Last Post: 04-21-2003, 08:12 AM
By taco Bill in forum ASP.NET
Last Post: 01-28-2003, 06:02 PM
By Brad Isaacs in forum Web
Last Post: 11-06-2001, 05:18 PM
Last Post: 09-01-2000, 04:41 PM
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL