Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jsf-2/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jakarta ee 从其他页面更新表单_Jakarta Ee_Jsf 2_Primefaces - Fatal编程技术网

Jakarta ee 从其他页面更新表单

Jakarta ee 从其他页面更新表单,jakarta-ee,jsf-2,primefaces,Jakarta Ee,Jsf 2,Primefaces,我想从其他页面更新表单,当用户单击按钮时,它将在其他页面显示表单,并更新其字段,如下所示: <p:commandButton value="Edit" actionListener="#{cubeMan.setUpdateCubeFilds()}" update=":form2"/> 这是我在另一页的表格: <h:form id="form2"> <p:panelGrid columns="2"> <p:

我想从其他页面更新表单,当用户单击按钮时,它将在其他页面显示表单,并更新其字段,如下所示:

<p:commandButton value="Edit" actionListener="#{cubeMan.setUpdateCubeFilds()}" update=":form2"/> 

这是我在另一页的表格:

 <h:form id="form2">


        <p:panelGrid columns="2"> 

        <p:outputLabel value="Name :" for="name_cube"/>
                <p:inputText id ="name_cube" value="#{cubeMan.cubUpdate.name_cube}" required="true"/>

        <p:outputLabel value="Description :" for="description_cube"/>
                <p:inputText id ="description_cube" value="#{cubeMan.cubUpdate.description_cube}" required="true"/>
                <p:outputLabel value="Caption:" for="caption_cube"/>
                <p:inputText id ="caption_cube" value="#{cubeMan.cubUpdate.caption_cube}" required="true"/>
                <p:outputLabel value="Visible:" />
                <p:selectBooleanCheckbox value="#{cubeMan.cubUpdate.visible}" ></p:selectBooleanCheckbox>
                <p:outputLabel value="Enabled:" />
                <p:selectBooleanCheckbox value="#{cubeMan.cubUpdate.enabled}" ></p:selectBooleanCheckbox>
                <p:outputLabel value="Cache:" />
                <p:selectBooleanCheckbox value="#{cubeMan.cubUpdate.cache}" ></p:selectBooleanCheckbox>
        </p:panelGrid>
    <p:commandButton value="Edit" actionListener="#{cubeMan.updateThisCube()}" update=":form2"></p:commandButton>
     <p:commandButton value="Add" action="#{cubeMan.makeCube()}" ></p:commandButton>
     <p:commandButton value="Delete" action="#{cubeMan.deleteCube()}"/>
      <p:commandButton id="EditCube" value="+" type="button" onclick="PF('dlg3').show();" />

     </h:form>


我的表单不在某个页面中,那么我应该怎么做呢?

您可以在主页中使用include,然后将您的src页面放在那里,它将起作用:

 <ui:include src="/SelectedCube.xhtml" />