You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Stanislav Sabol (JIRA)" <de...@myfaces.apache.org> on 2009/06/15 14:37:07 UTC
[jira] Created: (MYFACES-2252) Automatic ID generation in nested
subview tags
Automatic ID generation in nested subview tags
----------------------------------------------
Key: MYFACES-2252
URL: https://issues.apache.org/jira/browse/MYFACES-2252
Project: MyFaces Core
Issue Type: Bug
Components: JSR-252
Affects Versions: 1.2.6
Environment: All
Reporter: Stanislav Sabol
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?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.