Commit | Line | Data |
---|---|---|
59e4c94a MS |
1 | <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
2 | "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
3 | <ui:composition xmlns="http://www.w3.org/1999/xhtml" | |
4 | xmlns:s="http://jboss.com/products/seam/taglib" | |
5 | xmlns:ui="http://java.sun.com/jsf/facelets" | |
6 | xmlns:f="http://java.sun.com/jsf/core" | |
7 | xmlns:h="http://java.sun.com/jsf/html" | |
8 | xmlns:a="http://richfaces.org/a4j" | |
9 | xmlns:rich="http://richfaces.org/rich" | |
10 | template="/layout/template.xhtml"> | |
11 | ||
12 | <ui:define name="body"> | |
13 | ||
14 | <h:form id="instituicao" styleClass="edit"> | |
15 | ||
16 | <rich:panel> | |
17 | <f:facet name="header">#{instituicaoHome.managed ? 'Editar' : 'Nova'} Instituição</f:facet> | |
18 | ||
19 | ||
20 | <s:decorate id="nomeField" template="/layout/edit.xhtml"> | |
21 | <ui:define name="label">Nome</ui:define> | |
22 | <h:inputText id="nome" | |
23 | required="true" | |
24 | size="100" | |
25 | maxlength="100" | |
26 | value="#{instituicaoHome.instance.nome}"> | |
27 | <a:support event="onblur" reRender="nomeField" bypassUpdates="true" ajaxSingle="true"/> | |
28 | </h:inputText> | |
29 | </s:decorate> | |
30 | ||
31 | ||
32 | <s:decorate id="enderecoField" template="/layout/edit.xhtml"> | |
33 | <ui:define name="label">Endereço</ui:define> | |
34 | <h:inputText id="endereco" | |
35 | size="100" | |
36 | maxlength="100" | |
37 | value="#{instituicaoHome.instance.endereco}"> | |
38 | <a:support event="onblur" reRender="enderecoField" bypassUpdates="true" ajaxSingle="true"/> | |
39 | </h:inputText> | |
40 | </s:decorate> | |
41 | ||
42 | ||
43 | <s:decorate id="telefoneField" template="/layout/edit.xhtml"> | |
44 | <ui:define name="label">Telefone</ui:define> | |
45 | <h:inputText id="telefone" | |
46 | size="20" | |
47 | maxlength="20" | |
48 | value="#{instituicaoHome.instance.telefone}"> | |
49 | <a:support event="onblur" reRender="telefoneField" bypassUpdates="true" ajaxSingle="true"/> | |
50 | </h:inputText> | |
51 | </s:decorate> | |
52 | ||
53 | <div style="clear:both"> | |
54 | <span class="required">*</span> | |
55 | Informações Obrigatórias | |
56 | </div> | |
57 | ||
58 | </rich:panel> | |
59 | ||
60 | <div class="actionButtons"> | |
61 | ||
62 | <h:commandButton id="save" | |
63 | value="Salvar" | |
64 | action="#{instituicaoHome.persist}" | |
65 | disabled="#{!instituicaoHome.wired}" | |
66 | rendered="#{!instituicaoHome.managed}"/> | |
67 | ||
68 | <h:commandButton id="update" | |
69 | value="Salvar" | |
70 | action="#{instituicaoHome.update}" | |
71 | rendered="#{instituicaoHome.managed}"/> | |
72 | ||
73 | <h:commandButton id="delete" | |
74 | value="Excluir" | |
75 | action="#{instituicaoHome.remove}" | |
76 | immediate="true" | |
77 | rendered="#{instituicaoHome.managed}"/> | |
78 | ||
79 | <s:button id="cancelEdit" | |
80 | value="Cancelar" | |
81 | propagation="end" | |
82 | view="/seguro/admin/instituicao/InstituicaoList.xhtml" | |
83 | rendered="#{instituicaoHome.managed}"/> | |
84 | ||
85 | <s:button id="cancelAdd" | |
86 | value="Cancelar" | |
87 | propagation="end" | |
88 | view="/seguro/admin/instituicao/InstituicaoList.xhtml" | |
89 | rendered="#{!instituicaoHome.managed}"/> | |
90 | ||
91 | </div> | |
92 | </h:form> | |
93 | ||
94 | </ui:define> | |
95 | ||
96 | </ui:composition> |