我有两个托管bean,表单及其会话作用域。
form1按钮
<p:commandButton action="#{bean1.method1()}" ></p:commandButton>
form2按钮
<p:commandButton action="#{bean2.method2()}" ></p:commandButton>
我只得到其中一个表格。 “form2 value”为null。为什么呢?
<script>
function submitOthers() {
document.getElementById("form1").submit();
document.getElementById("form2").submit();
}
</script>
<h:form id="form3">
<input type="submit" value="Submit" name="Submit" onclick="submitOthers()"/>
</h:form>