title: How to use <h:form> in JSF page? Single form? Multiple forms? Nested forms?
body: <p>I am using the Facelet Templating Technology to layout my page in a JSF 2 app that I am working on.</p>
  
  <p>In my header.xhtml, primefaces requires that menubar be enclosed in h:form.</p>
  
  <pre><code>&lt;h:form&gt;
      &lt;p:menubar autoSubmenuDisplay="true"&gt;
          Menu Items here!
      &lt;/p:menubar&gt;
  &lt;/h:form&gt;
  </code></pre>
  
  <p>So, in my contents pages, I will have another h:form or more.</p>
  
  <p>Will it just work if I just place the h:form in my template.xhtml?</p>
  
  <pre><code>&lt;h:body&gt;
      &lt;h:form&gt;
          &lt;div id="top"&gt;
              &lt;ui:insert name="header"&gt;&lt;ui:include src="sections/header.xhtml"/&gt;&lt;/ui:insert&gt;
          &lt;/div&gt;
          &lt;div&gt;
              &lt;div id="left"&gt;
                  &lt;ui:insert name="sidebar"&gt;&lt;ui:include src="sections/sidebar.xhtml"/&gt;&lt;/ui:insert&gt;
              &lt;/div&gt;
              &lt;div id="content" class="left_content"&gt;
                  &lt;ui:insert name="content"&gt;Content&lt;/ui:insert&gt;
              &lt;/div&gt;
          &lt;/div&gt;
          &lt;div id="bottom"&gt;
              &lt;ui:insert name="footer"&gt;&lt;ui:include src="sections/footer.xhtml"/&gt;&lt;/ui:insert&gt;
          &lt;/div&gt;
      &lt;h:form&gt;
  &lt;/h:body&gt;
  </code></pre>
  
  <p>I am actually thinking of a use case where I need multiple h:form in a page.</p>
  
  <p>Thanks</p>