4 Replies Latest reply on Mar 19, 2009 4:20 AM by Dongyao Zhao

    how to use h:form rightly

    Dongyao Zhao Novice

      it's bad to have more than one form on a page? e.g in my page there is rich:tree at the left, and sdt at the right. The both are wired by facelets composition, and are inserted into a page. My question is that, it is better, every component wired by h:form or both wired by a h:form. i.e, that
      tree.html

      <ui:composition>
      <h:form>
      <rich:tree/>
      </h:form>
      </ui:composition>
      


      dataTable.html
      <ui:composition>
      <h:form>
      <rich:dataTable/>(include a4j:command )
      </h:form>
      </ui:composition>
      


      page.xhtml
      <html>
      <ui:insert>tree.xhtml</ui:insert>
      <ui:insert>dataTable.xhtml</ui:insert>
      </html>
      


      or in tree.xhtml and dataTable.xhtml without h:form, only with one h:form in page.xhtml
      <html>
      <h:form>
      <ui:insert>tree.xhtml</ui:insert>
      <ui:insert>dataTable.xhtml</ui:insert>
      </h:form>
      </html>