Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html"
- xmlns:componente="http://java.sun.com/jsf/composite/componente" xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.org/ui"
- template="/WEB-INF/template/principal.xhtml">
- <div id="global">
- <ui:define name="content">
- <h:form id="formDinamic">
- <ui:include src="/pages/templates/adicionaisUsuario.xhtml" />
- <p:remoteCommand name="updateCep" process="@form:fixedPanel" />
- </h:form>
- <ui:include src="/pages/dialogSearchCepPorEndereco.xhtml">
- <ui:param name="modo" value="E" />
- </ui:include>
- </ui:define>
- </div>
- </ui:composition>
- <p:panelGrid id="fixedPanel" column="4">
- <p:inputText id="input1" value="#{crudMb.object1.value1}" />
- <p:inputText id="input2" value="#{crudMb.object1.value2}" />
- <p:inputText id="input3" value="#{crudMb.object1.value3}" />
- <p:commandButton actionListener="#{enderecoMb.doPrepare}" oncomplete="PF('dlgPesqCep').show();"
- process="@this :dialogPesquisaCep" update="fixedPanel">
- <f:setPropertyActionListener target="#{enderecoMb.object1}" value="#{crudMb.object1}" />
- <f:setPropertyActionListener target="#{enderecoMb.tipoEndereco}" value="Residencial" />
- </p:commandButton>
- </p:panelGrid>
- <?xml version="1.0" encoding="UTF-8"?>
- <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html"
- xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.org/ui">
- <p:dialog id="dialogPesquisaCep" position="center" modal="true" widgetVar="dlgPesqCep" resizable="false" width="670"
- height="500" header="#{enderecoMb.titulo}" onShow="rc();">
- <h:form id="formPesquisaCep">
- <p:remoteCommand name="rc" resetValues="true" update="dtlistCeps pBuscaCep" />
- <p:messages closable="true" id="msgCep" redisplay="false" />
- <p:panelGrid id="pBuscaCep" >
- <p:row>
- inputs for search...
- </p:row>
- <p:row>
- <p:column>
- <p:commandButton value="" id="btnPesquisaCep" actionListener="#{enderecoMb.doEventListEnderecos()}"
- styleClass="btn_pesquisar" style="margin-left: 9px;" update="msgCep dtlistCeps">
- <f:setPropertyActionListener value="#{modo}" target="#{enderecoMb.modo}" />
- </p:commandButton>
- </p:column>
- </p:row>
- </p:panelGrid>
- </fieldset>
- <p:dataTable id="dtlistCeps" var="end" value="#{enderecoMb.enderecos}" emptyMessage="#{m['nenhum.registro']}"
- rowIndexVar="index"
- rowKey="#{end.cep}" selectionMode="single">
- <p:ajax event="rowSelect" listener="#{enderecoMb.onRowSelectEndereco}" oncomplete="PF('dlgPesqCep').hide();"
- update="@(:table[name*='fixedPanel'])">
- <f:setPropertyActionListener target="#{enderecoMb.enderecoPesquisado}" value="#{end}" />
- </p:ajax>
- <p:columns... />
- </p:dataTable>
- </h:form>
- </p:dialog>
- </ui:composition>
Add Comment
Please, Sign In to add comment