title: composite component and ajax update
body: <p>I need to update a form within the composite component using ajax. I gave id as "comImplContSearch" to the composite component when using it,so that it will not generate random id. In the dom after the html is generated, the form id which i need to call (which is within the cc) is comImplContSearch_contentListForm. And it is given at the update attribute of f:ajax of the composite component. We are using seperator as '_' instead of default ':' in web.xml. Is there anything i need to correct to avoid the error. </p>
  
  <h2>Composite component code</h2>
  
  <pre><code>&lt;composite:interface&gt;
          &lt;composite:attribute name="id"&gt;&lt;/composite:attribute&gt;
      &lt;/composite:interface&gt;
      &lt;composite:implementation&gt;
          &lt;h:form id="contentLefNavForm" prependId="false"&gt;
              &lt;p:tree id="folderTree"
                  value="#{contentSearchController.contentListBean.folderTree}"
                  var="node" styleClass="folderTree" selectionMode="single"
                  animate="true" dynamic="false"
                  selection="#{contentSearchController.contentListBean.selectedFolderTreeNode}"
                  highlight="false" widgetVar="folderTreeHandle"&gt;
                  &lt;p:ajax event="select"
                      listener="#{contentSearchController.selectFolderNode}" update="_#{cc.attrs.id}_contentListForm"
                      /&gt;
                  &lt;p:treeNode styleClass="folderTreeRow"
                      collapsedIcon="iconColor iconFolder"
                      expandedIcon="iconColor iconFolderOpen"&gt;
                      &lt;h:outputText value="#{node.title}" /&gt;
                  &lt;/p:treeNode&gt;
              &lt;/p:tree&gt;
          &lt;/h:form&gt;
  
          &lt;h:form id="contentListForm" &gt;
             .....................
            &lt;/h:form&gt;
  </code></pre>
  
  <h2>when using the composite component</h2>
  
  <pre><code>        &lt;h:form id="searchContentForm" prependId="false"&gt;
              &lt;util:contentSearch id="comImplContSearch" /&gt;
          &lt;/h:form&gt;
  </code></pre>
  
  <h2>Error</h2>
  
  <pre><code>19:13:55,969 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/emyed-web].[Faces Servlet]] (http--127.0.0.1-8080-2) Servlet.service() for servlet Faces Servlet threw exception: javax.faces.FacesException: Cannot find component with identifier "_comImplContSearch_contentListForm" referenced from "comImplContSearch_folderTree".
      at org.primefaces.util.ComponentUtils.findClientIds(ComponentUtils.java:251) [primefaces-3.3.1.jar:]
      at org.primefaces.util.AjaxRequestBuilder.addIds(AjaxRequestBuilder.java:102) [primefaces-3.3.1.jar:]
      at org.primefaces.util.AjaxRequestBuilder.update(AjaxRequestBuilder.java:90) [primefaces-3.3.1.jar:]
      at org.primefaces.component.behavior.ajax.AjaxBehaviorRenderer.getScript(AjaxBehaviorRenderer.java:63) [primefaces-3.3.1.jar:]
      at javax.faces.component.behavior.ClientBehaviorBase.getScript(ClientBehaviorBase.java:103) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
      at org.primefaces.renderkit.CoreRenderer.encodeClientBehaviors(CoreRenderer.java:288) [primefaces-3.3.1.jar:]
      at org.primefaces.component.tree.TreeRenderer.encodeScript(TreeRenderer.java:132) [primefaces-3.3.1.jar:]
      at org.primefaces.component.tree.TreeRenderer.encodeEnd(TreeRenderer.java:97) [primefaces-3.3.1.jar:]
      at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:875) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1786) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
      at javax.faces.render.Renderer.encodeChildren(Renderer.java:168) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
      at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:304) [jsf-impl-2.1.7-jbossorg-2.jar:]
      at com.sun.faces.renderkit.html_basic.GroupRenderer.encodeChildren(GroupRenderer.java:105) [jsf-impl-2.1.7-jbossorg-2.jar:]
      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1779) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
      at com.sun.faces.renderkit.html_basic.CompositeRenderer.encodeChildren(CompositeRenderer.java:78) [jsf-impl-2.1.7-jbossorg-2.jar:]
      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1779) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
      at javax.faces.render.Renderer.encodeChildren(Renderer.java:168) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:845) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
      at org.primefaces.renderkit.CoreRenderer.renderChild(CoreRenderer.java:55) [primefaces-3.3.1.jar:]
      at org.primefaces.renderkit.CoreRenderer.renderChildren(CoreRenderer.java:43) [primefaces-3.3.1.jar:]
      at org.primefaces.component.overlaypanel.OverlayPanelRenderer.encodeMarkup(OverlayPanelRenderer.java:55) [primefaces-3.3.1.jar:]
      at org.primefaces.component.overlaypanel.OverlayPanelRenderer.encodeEnd(OverlayPanelRenderer.java:35) [primefaces-3.3.1.jar:]
      at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:875) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1786) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1782) [jboss-jsf-api_2.1_spec-2.0.1.Final.jar:2.0.1.Final]
  </code></pre>
  
  <h2>if i  remove update in f:ajax, the form id is</h2>
  
  <p><img src="https://i.stack.imgur.com/LQwvl.jpg" alt="enter image description here"></p>