daily pastebin goal
43%
SHARE
TWEET

Untitled

a guest Jan 18th, 2019 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <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"
  2.     xmlns:componente="http://java.sun.com/jsf/composite/componente" xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.org/ui"
  3.     template="/WEB-INF/template/principal.xhtml">
  4.     <div id="global">
  5.         <ui:define name="content">
  6.             <h:form id="formDinamic">
  7.                 <ui:include src="/pages/templates/adicionaisUsuario.xhtml" />
  8.  
  9.                 <p:remoteCommand name="updateCep" process="@form:fixedPanel" />
  10.             </h:form>
  11.  
  12.             <ui:include src="/pages/dialogSearchCepPorEndereco.xhtml">
  13.                 <ui:param name="modo" value="E" />
  14.             </ui:include>
  15.         </ui:define>
  16.     </div>
  17. </ui:composition>
  18.    
  19. <p:panelGrid id="fixedPanel" column="4">
  20.  
  21.     <p:inputText id="input1" value="#{crudMb.object1.value1}" />
  22.     <p:inputText id="input2" value="#{crudMb.object1.value2}" />
  23.     <p:inputText id="input3" value="#{crudMb.object1.value3}" />
  24.  
  25.     <p:commandButton actionListener="#{enderecoMb.doPrepare}" oncomplete="PF('dlgPesqCep').show();"
  26.         process="@this :dialogPesquisaCep" update="fixedPanel">
  27.         <f:setPropertyActionListener target="#{enderecoMb.object1}" value="#{crudMb.object1}" />
  28.         <f:setPropertyActionListener target="#{enderecoMb.tipoEndereco}" value="Residencial" />
  29.     </p:commandButton>
  30.  
  31. </p:panelGrid>
  32.    
  33. <?xml version="1.0" encoding="UTF-8"?>
  34. <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"
  35.     xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.org/ui">
  36.  
  37.     <p:dialog id="dialogPesquisaCep" position="center" modal="true" widgetVar="dlgPesqCep" resizable="false" width="670"
  38.         height="500" header="#{enderecoMb.titulo}" onShow="rc();">
  39.  
  40.         <h:form id="formPesquisaCep">
  41.             <p:remoteCommand name="rc" resetValues="true" update="dtlistCeps pBuscaCep" />
  42.                 <p:messages closable="true" id="msgCep" redisplay="false" />
  43.  
  44.                 <p:panelGrid id="pBuscaCep" >
  45.                     <p:row>
  46.                         inputs for search...
  47.                     </p:row>
  48.                     <p:row>
  49.                         <p:column>
  50.                             <p:commandButton value="" id="btnPesquisaCep" actionListener="#{enderecoMb.doEventListEnderecos()}"
  51.                                 styleClass="btn_pesquisar" style="margin-left: 9px;" update="msgCep dtlistCeps">
  52.                                 <f:setPropertyActionListener value="#{modo}" target="#{enderecoMb.modo}" />
  53.                             </p:commandButton>
  54.                         </p:column>
  55.                     </p:row>
  56.                 </p:panelGrid>
  57.             </fieldset>
  58.  
  59.             <p:dataTable id="dtlistCeps" var="end" value="#{enderecoMb.enderecos}" emptyMessage="#{m['nenhum.registro']}"
  60.               rowIndexVar="index"
  61.               rowKey="#{end.cep}" selectionMode="single">
  62.  
  63.                 <p:ajax event="rowSelect" listener="#{enderecoMb.onRowSelectEndereco}" oncomplete="PF('dlgPesqCep').hide();"
  64.                     update="@(:table[name*='fixedPanel'])">
  65.                     <f:setPropertyActionListener target="#{enderecoMb.enderecoPesquisado}" value="#{end}" />
  66.                 </p:ajax>
  67.  
  68.                 <p:columns... />
  69.  
  70.             </p:dataTable>
  71.  
  72.         </h:form>
  73.  
  74.     </p:dialog>
  75. </ui:composition>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top