Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
1.2.6
-
None
-
None
-
All
Description
I have a problem how myfaces-1.2.6 generates ids for components. I have migrated from myfaces-1.1.5 to myfaces-1.2.6. I have a following scenario:
I need to include few jsp fragments on main page:
main page main.jsp:
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<f:view>
<f:subview id="subview1">
<jsp:include page="include.jsp"/>
</f:subview>
<f:subview id="subview2">
<jsp:include page="include.jsp"/>
</f:subview>
</f:view>
included page include.jsp :
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<f:subview id="subview_inner">
<h:outputText id="text" value="some text"></h:outputText>
</f:subview>
my generated html code :
<span id="subview1:subview_inner:text">some text</span><span id="subview2:subview_inner:textj_id_1">some text</span>
in myfaces -1.1.5 it generates:
<span id="subview1:subview_inner:text">some text</span><span id="subview2:subview_inner:textj">some text</span>
so id text has been changed by framework to textj_id_1 - this is serious problem to me
also when i don't use jsp:include and have only on page like this:
<f:view>
<f:subview id="subview1">
<f:subview id="subview_inner">
<h:outputText id="text" value="some text"></h:outputText>
</f:subview>
</f:subview>
<f:subview id="subview2">
<f:subview id="subview_inner">
<h:outputText id="text" value="some text"></h:outputText>
</f:subview>
</f:subview>
</f:view>
generated output is ok
<span id="subview1:subview_inner:text">some text</span><span id="subview2:subview_inner:text">some text</span>
please can you explain if this is a bug and why myfaces decide that all components ids in my second fragment must be changed?
Attachments
Issue Links
- duplicates
-
MYFACES-1834 suffix added to component id when including files
- Closed