I use the dialog structure:
http://www.primefaces.org/showcase-labs/ui/dialogFrameworkData.jsf
I create a view_test.xhtml file
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui" >
<h:head>
<title>Dialogo Prueba</title>
</h:head>
<h:body>
<h:form id="idFormTest">
<h:panelGrid id="idPgAdressStore" columns="2" columnClasses="col1,col2">
<h:outputLabel for="idAdress" value="Adress: " />
<p:inputText id="idAdress" label="Adresss" size="40" value="#{storeBean.au.strAdress}"/>
<f:facet name="footer">
<h:panelGrid width="100%" columns="2" style="text-align:center">
<p:commandButton id="idBtSaveDir" value="Save" actionListener="#{storeBean.saveAdress}" />
<p:commandButton id="idBtCancelDir" actionListener="#{storeBean.closeAdress}" value="Cancel"/>
</h:panelGrid>
</f:facet>
</h:panelGrid>
</h:form>
</h:body>
this dialog is open for another form of "idFormStore", when I press commandButton "idBtSaveDir", the saveAdress method is called and the value in idAdress is copied to another input text in idFormStore
public void saveAdress(ActionEvent event) {
au.setAdressStore(au.getStrAdress());
RequestContext.getCurrentInstance().update("idFormStore");
RequestContext.getCurrentInstance().closeDialog("/pages/logistica/store/view_test");
}
I am updating the idFormStore form but not updating RequestContext.getCurrentInstance (). Update ("idFormStore") does not work,
I also add a panel where inputext is located, and does not update,. RequestContext.getCurrentInstance () update ("idFormStore: idPanelStore")
, , , RequestContext.getCurrentInstance(). update?