Reputation: 8768
Assume I have
<ui:composition
xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://xmlns.jcp.org/jsf/html"
xmlns:f="http://xmlns.jcp.org/jsf/core"
xmlns:p="http://primefaces.org/ui"
xmlns:c="http://xmlns.jcp.org/jsp/jstl/core">
<div>
<p:accordionPanel id="accordionPanel" multiple="false" >
<div >
<p:tab title="aTab">
<!--logical naming container tag open-->
<h:form>
<h:inputText id="inputText" value="#{backingBean.property}">
<f:ajax event="change" listener="#{backingBean.onChange}" render="@form ..:autoCompleteForm:autoComplete"/>
</h:inputText>
</h:form>
<h:form id="autoCompleteForm">
<p:autoComplete id="autoComplete" value="#{backingBean.property2}" disabled="#{backingBean.disabled}"/>
</h:form>
<!--logical naming container tag close-->
</p:tab>
</div>
</p:accordionPanel>
</div>
</ui:composition>
and I want to reference autoComplete
relatively from the first form. According to http://illegalargumentexception.blogspot.de/2009/02/jsf-working-with-component-ids.html a relative id specification is resolved relative to the closest naming container and to the closest naming container of the closest naming container if ..:
is specified. According to http://www.primefaces.org/docs/api/5.0/ Tab
isn't a NamingContainer
(neither is AccordionPanel
) which brings me in need of a logical naming container element which I imagine to put where the comments are in order to reduce complexity to a minimum for relative references. What would such a logical naming container be (I assmue that nested forms are not allowed (Nested forms in JSF))?
Upvotes: 1
Views: 299