Bug 1323920

Summary: [GSS](6.4.z) JAVASERVERFACES-3545 - ComponentSupport.getFaceletComponentMap() returns wrong components when using dynamic includes / JAVASERVERFACES-3698
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Kunjan Rathod <krathod>
Component: JSFAssignee: Chao Wang <chaowan>
Status: CLOSED CURRENTRELEASE QA Contact: Pavol Pitonak <ppitonak>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 6.4.6CC: bmaxwell, chaowan, fjuma, jawilson, jtruhlar, maschmid, msochure, rhatlapa, rmody, rnetuka, ssilvert
Target Milestone: CR1   
Target Release: EAP 6.4.9   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-17 12:56:50 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:
Bug Depends On:    
Bug Blocks: 1323925, 1323929, 1324262, 1326166    
Attachments:
Description Flags
The error is reproducible using the attached war none

Description Kunjan Rathod 2016-04-05 05:24:18 UTC
Created attachment 1143668 [details]
The error is reproducible using the attached war

Description of problem:

ComponentSupport.getFaceletComponentMap() returns wrong components when using dynamic includes


Version-Release number of selected component (if applicable):


How reproducible:

When switching back and forth between the tabs, the components for <h:inputText/> are getting mixed up and the content of the tabs show wrong values.

Steps to Reproduce:
Snippet of the example's view:
<h:panelGroup layout="block">
<h:commandLink value="Tab 0" style="margin-right: 10px;">
<f:ajax event="click" execute="@form" render="@form"
listener="#
{TestBean.tab0Click}
" />
</h:commandLink>
<h:commandLink value="Tab 1">
<f:ajax event="click" execute="@form" render="@form"
listener="#
{TestBean.tab1Click}
" />
</h:commandLink>
<f:subview id="tab1">
<c:if test="#
{TestBean.tab0Expanded}
">
Tab 0: 
<base:inputText id="tab1txt" bean="#
{TestBean.bean0}
" />
</c:if>
</f:subview>
<f:subview id="tab2">
<c:if test="#
{TestBean.tab1Expanded}
">
Tab 1: 
<base:inputText id="tab2txt" bean="#
{TestBean.bean1}
" />
</c:if>
</f:subview>
</h:panelGroup>
The example also includes a workaround for the issue. Uncomment the tag-handler-delegate-factory in faces-config.xml and the issue disappears.
Basis of the workaround is a custom FaceletContext that is adding the parent component id the every tag id. Then the ids are always unique even when there are dynamic contents involved. Please comment if this is a feasible way to go because I am not sure if this has any side effects.

Actual results:


Expected results:


Additional info:

https://java.net/jira/browse/JAVASERVERFACES-3545
https://java.net/jira/browse/JAVASERVERFACES-3698

Comment 11 Petr Penicka 2017-01-17 12:56:50 UTC
Retroactively bulk-closing issues from released EAP 6.4 cummulative patches.