Bug 793653 (JBEPP-731)

Summary: PBR-223 javax.faces.ViewState returns the same value for each portlets on one portal page when state saving method is set as "client".
Product: [JBoss] JBoss Enterprise Portal Platform 5 Reporter: Gary Hu <garyhu2>
Component: unspecifiedAssignee: Thomas Heute <theute>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: unspecifiedCC: epp-bugs, ken, theute
Target Milestone: ---   
Target Release: 5.2.0.GA   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/JBEPP-731
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-01-23 11:29:35 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:

Description Gary Hu 2010-12-14 15:14:10 UTC
Help Desk Ticket Reference: https://c.na7.visual.force.com/apex/Case_View?id=500A0000004StwsIAC&sfdc.override=1
project_key: JBEPP

When the state saving method is set as "client" two different portlets running on same portal page shows the exact same javax.faces.ViewState value, which might be causing one of our a4j:jsFunction not functioning properly.

We placed alerts inside the script "rfResorg.ajax4jsf.javascript.AjaxScript.faces"
(code snippet below) and found that problem is that the value of "options.parameters['org.ajax4jsf.portlet.NAMESPACE']" is coming as "undefined" and hence as per the line "anchor=namespace?window.document.getElementById(namespace):window.document;" the whole html document is being picked up for replacement of viewstate.

*****************************************************************
var namespace = options.parameters['org.ajax4jsf.portlet.NAMESPACE'];
LOG.debug("Namespace for hidden view-state input fields is "+namespace);
var anchor = namespace?window.document.getElementById(namespace):window.document;
var inputs = anchor.getElementsByTagName("input");
var newinputs = req.getElementsByTagName("input",idsSpan);
A4J.AJAX.replaceViewState(inputs,newinputs);
// For any cases, new state can be in uppercase element
newinputs = req.getElementsByTagName("INPUT",idsSpan);
A4J.AJAX.replaceViewState(inputs,newinputs);
*****************************************************************

It seems that Portlet A's view state is replaced by Portlet B's view state. As a result, an ajax request sent by Portlet A faces Portlet B's view state, which causes the failure of invoking Portlet A's server side method.

Comment 1 Gary Hu 2010-12-14 15:14:43 UTC
Link: Added: This issue Cloned to PBR-223


Comment 3 Jared MORGAN 2011-11-17 03:24:09 UTC
Release Notes Docs Status: Added: Not Yet Documented


Comment 4 hfnukal@redhat.com 2012-01-13 09:44:36 UTC
Labels: Added: EPP_5_2_1_Candidate


Comment 9 Thomas Heute 2012-01-23 11:29:35 UTC
Release Notes Docs Status: Removed: Not Yet Documented Added: Not Required
Labels: Removed: EPP_5_2_1_Candidate