Bug 793653 (JBEPP-731) - PBR-223 javax.faces.ViewState returns the same value for each portlets on one portal page when state saving method is set as "client".
Summary: PBR-223 javax.faces.ViewState returns the same value for each portlets on on...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: JBEPP-731
Product: JBoss Enterprise Portal Platform 5
Classification: JBoss
Component: unspecified
Version: unspecified
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 5.2.0.GA
Assignee: Thomas Heute
QA Contact:
URL: http://jira.jboss.org/jira/browse/JBE...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-12-14 15:14 UTC by Gary Hu
Modified: 2012-02-28 16:33 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-01-23 11:29:35 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker JBEPP-731 0 None None None Never
Red Hat Issue Tracker PBR-223 0 None None None Never

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 



Note You need to log in before you can comment on or make changes to this bug.