DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2012

    Post 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.
    Tried Solutions:
    Java script:
    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.

  2. #2
    Join Date
    Apr 2007
    Sterling Heights, Michigan
    What do you have that isn't working?

Similar Threads

  1. how to go back to previous page?
    By izza_azhar in forum ASP.NET
    Replies: 3
    Last Post: 04-14-2006, 10:45 PM
  2. Replies: 2
    Last Post: 04-21-2003, 07:12 AM
  3. Replies: 3
    Last Post: 01-28-2003, 05:02 PM
  4. Refresh Browser works incorrectly?????
    By Brad Isaacs in forum Web
    Replies: 1
    Last Post: 11-06-2001, 04:18 PM
  5. Session variable problems
    By Nate in forum ASP.NET
    Replies: 5
    Last Post: 09-01-2000, 03:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center