Bug 822202

Summary: Richfaces Kitchensink archetype - back button does not back to the correct page state
Product: [Retired] JBoss Enterprise WFK Platform 2 Reporter: Juraj Huska <jhuska>
Component: Examples, RichFacesAssignee: Karel Piwko <kpiwko>
Status: CLOSED CURRENTRELEASE QA Contact: Pavol Pitonak <ppitonak>
Severity: low Docs Contact:
Priority: low    
Version: 2.0.0.ER6CC: bsutter, jpapouse, mnovotny, ppitonak, rruss
Target Milestone: CR1   
Target Release: 2.1.0   
Hardware: All   
OS: Linux   
Whiteboard: rf-kitchensink
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-11-30 15:34:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Juraj Huska 2012-05-16 15:58:23 UTC
Description of problem:
When clicking on the url of the freshly created new member (like /rest/members/0) and backing back from the xml viewing, results in removed freshly added member.
After refresh, or AJAX update (clicking on collapsiblePanel), the table is with all members again.

This happens only for freshly added members.

Version-Release number of selected component (if applicable):
Richfaces 4.2.1.Final

How reproducible:
On AS: JBoss AS 7.1.1.Final, EAP 6.0.0.ER3.

Steps to Reproduce:
1. Fill in correct data about member
2. Register him/her
3. Click on the REST url, generated for the particular added member
4. After loading new page, press browser back button
5. see that the new added member is not there

Comment 2 JBoss JIRA Server 2012-10-30 23:49:25 UTC
Brian Leathem <bleathem> made a comment on jira RF-12076

The problem is the browser is caching the page, and the ajax update doesn't refresh the cached copy of the page.  The solution is to disable caching for the page by manipulating the response headers:

{code}
response.addHeader("Pragma", "no-cache");
response.addHeader("Cache-Control", "no-cache");
{code}

This can be done in a ServletFilter, or in a JSF phase listener.

Comment 3 JBoss JIRA Server 2012-10-30 23:53:25 UTC
Brian Leathem <bleathem> made a comment on jira RF-12076

Implementing a filter or listener to disable the page cache will significantly increase the complexity of this example quickstart application without adding much benefit.

As an alternate solution, I propose setting the _target_ attribute of the REST link to open up the REST pages in a new window/tab.

Comment 4 JBoss JIRA Server 2012-10-30 23:56:51 UTC
Brian Leathem <bleathem> updated the status of jira RF-12076 to Resolved

Comment 5 JBoss JIRA Server 2012-10-30 23:56:51 UTC
Brian Leathem <bleathem> made a comment on jira RF-12076

Changed the REST links to open up in a new window

Comment 9 Karel Piwko 2012-11-30 15:34:02 UTC
Distributed as a part of WFK 2.1.0.GA release.

Comment 10 JBoss JIRA Server 2012-12-19 18:15:33 UTC
Juraj Húska <jhuska> updated the status of jira RF-12076 to Closed