[ http://issues.apache.org/jira/browse/MYFACES-769?page=comments#action_12360256 ]
Simon Kitching commented on MYFACES-769: ---------------------------------------- With non-portal JSP/JSF applications, including an external file multiple times is not an issue. Suppose the included file has: <h:inputText id="zzz"/> The including page then does this: <f:subview id="first"> <jsp:include page="include.jsp"/> </f:subview> <f:subview id="second"> <jsp:include page="include.jsp"/> </f:subview> This results in ids "first:zzz" and "second:zzz". Note that wrapping includes in f:subview is *required by the spec*, for exactly this reason. However if all components in the included page have dynamic ids you can get away without using f:subview. If the included page is: <h:inputText .. /> then the including page can do: <jsp:include page="include.jsp"/> <jsp:include page="include.jsp"/> <jsp:include page="include.jsp"/> resulting in components with ids _id0, _id1, _id2 respectively. I don't know how this works with portlets, but I would assume that each portlet should be a "subview", thus ensuring the ids of its components don't conflict. The f:subview works just like any old namespacing (filesystem, java package names, etc): you place names within parent namespaces to avoid name conflicts. > configurable IDs used for rendering > ----------------------------------- > > Key: MYFACES-769 > URL: http://issues.apache.org/jira/browse/MYFACES-769 > Project: MyFaces > Type: Improvement > Reporter: Dave Brondsema > > If the same code is used ot generated a component tree for more than one part > of a webpage, the rendered IDs are the same and functionality is broken > (javascript needs unique IDs). > An example of when this happens is when as portlet uses JSF for rendering. > If the portlet is used more than once on a single page (e.g. an RSS reader) > all the IDs are the same. > Thus we need a way to have more configurable (perhaps random) IDs when > rendered. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
