JSF Back Button Problem
I think every JSF application developer is familiar with this problem.JSF saves the state of every page loaded in a browser. Therefore, everytime a user clicks the browser back button, JSF loads the saved state of the target page.
So, what's the problem?
1.) Data tables / Navigation using actions. For example. We have a datatable that lists certain information from a database (like a list of the class members). When a class member is clicked, JSF loads new page (let's say, displayInfo.jsf) and displays the info about that member. When the user clicks the browser back button, JSF loads the saved state of the previous page. And when the user clicks another class member, he / she may not receive the correct info, depending on the position of the class member on the datatable.
2.) Security. Logging in / out
Solutions (but not sound):
- a user must click refresh every after he / she clicks the back button
(no way)
- equip our pages with our own back button
(users are accustomed to the browser's back button)
- implement certain navigation smart handlers that involves a bunch of weird and long java codes
(for us developers, we don't want to have a bulky app; for users, they don't want slow loading pages. JSP is slow in the first place)
- use Sun Java Studio Creator
(vicky sez, no way!)
After more than two weeks of researching since the first time I encountered this problem, i found the ultimate solution - Use JSF version 1.2
Problem: JSF v1.2 is not yet available. Only the proposed final draft specifications.
0 Comments:
Post a Comment
<< Home