title: Call another form from the command button
body: <p>When I submit a form it should call another form so that I can render it. I use primefaces and I want it to work something like below. But it is throwing an error. </p>
  
  <h1>xhtml</h1>
  
  <pre><code>&lt;h:form id="from1"&gt;
  &lt;h:inputText=......
  &lt;h:outputText=....
  &lt;p:commandButton id="submit" actionlistener="#{bean.method}" value="submit" process="form2"/&gt;
  
  &lt;h:form id="form2"&gt;
  &lt;h:outoutText value="it is working" render="#{bean.boolean}" /&gt;
  &lt;/h:form&gt;
  </code></pre>
  
  <p>error</p>
  
  <pre><code>[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 "form2" referenced from "form1_submit".
  </code></pre>
  
  <p><strong>Updated</strong></p>
  
  <pre><code>&lt;h:form id="from1"&gt;
      &lt;h:inputText=......
      &lt;h:outputText=....
      &lt;p:commandButton id="submit" actionlistener="#{bean.method}" value="submit" update=":form1"/&gt;
  &lt;/h:form&gt;
  </code></pre>