Details
-
Type: Bug
-
Status: Resolved
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 1.1 Final
-
Fix Version/s: 1.2 Beta
-
Component/s: None
-
Labels:None
-
Environment:ICEfaces 3.1
Description
Users will want to reuse xhtml fragments in both small and large layout views but this currently results in a duplicate ID exception being thrown. For example, you can't have id="panel3" in both small and large xhtml:
<mobi:viewSelector>
<f:facet name="small">
<ui:include src="WEB-INF/views/small.xhtml" />
</f:facet>
<f:facet name="large">
<ui:include src="WEB-INF/views/large.xhtml" />
</f:facet>
</mobi:viewSelector>
One possible solution would be to create a child component of the viewSelector that would be a NamingContainer and as such would avoid the duplicate id issue.
<mobi:viewSelector>
<f:facet name="small">
<ui:include src="WEB-INF/views/small.xhtml" />
</f:facet>
<f:facet name="large">
<ui:include src="WEB-INF/views/large.xhtml" />
</f:facet>
</mobi:viewSelector>
One possible solution would be to create a child component of the viewSelector that would be a NamingContainer and as such would avoid the duplicate id issue.
A temporary workaround is to add a subview:
<mobi:viewSelector>
<f:facet name="small">
<f:subview id="small">