我有一个包含内部表单的主表单(该内部表单仅出现在编辑案例中)并且我希望两个表单彼此分开,而不是在提交主表单时内部没有提交,该怎么做?
这是一个片段:
<h:form id="mainForm">
<!-- some inputs here -->
<h:commandButton value="submit main" action="#{myBean.mainSubmit()}" />
<h:panelGroup rendered="#{myBean.editMode}">
<h:form id="innerForm">
<!-- some inputs here -->
<h:commandButton value="submit inner" action="#{myBean.innerSubmit()}" />
</h:form>
</h:panelGroup>
</h:form>
当前行为:提交 mainForm 时也提交了内部表单,但提交内部表单时未提交 main。
Desired Behavior:提交mainForm时,内部没有提交,提交内部时,main也没有提交。