Java 如何使一个表单标记与另一个表单标记通信?
我使用的是JSF 2.2、PrimeFaces和Glassfish,我有:Java 如何使一个表单标记与另一个表单标记通信?,java,forms,jsf,primefaces,Java,Forms,Jsf,Primefaces,我使用的是JSF 2.2、PrimeFaces和Glassfish,我有: <h:form id="formularioAltas"> //more code <p:commandButton value="Guardar" action="#{altasBean.agregarRefaccion()}" /> </h:form> <h:form id="myForm" enctype="multipart/form-data" pre
<h:form id="formularioAltas">
//more code
<p:commandButton value="Guardar" action="#{altasBean.agregarRefaccion()}" />
</h:form>
<h:form id="myForm" enctype="multipart/form-data" prependId="false" rendered="#{altasBean.estado}">
// more code here
</h:form>
//更多代码
//这里有更多代码
我需要formularoaltas
告诉myForm
布尔属性estado
的值已更改。当执行commandButton
时,我会像对myForm
执行一个简单的update
一样理解它,但这并不是因为它们的形式不同。我需要这种方式,因为我上传文件到服务器时遇到问题,所以我决定使用两种不同的表单。我有工作表单,但我只想在执行commandButton
时显示myForm
有什么想法吗?
<p:commandButton value="Guardar" action="#{altasBean.agregarRefaccion()}" update=":myForm" />
:
因为您将容器层次结构向包含表单和myForm
的容器上移了一步,因为这是她的名字