Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 7th, 2012  |  syntax: None  |  size: 2.73 KB  |  hits: 12  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml"
  3.       xmlns:h="http://java.sun.com/jsf/html"
  4.       xmlns:f="http://java.sun.com/jsf/core"
  5.       xmlns:ui="http://java.sun.com/jsf/facelets"
  6.       xmlns:s="http://jboss.com/products/seam/taglib"
  7.       xmlns:rich="http://richfaces.org/rich">
  8.  
  9.         <ui:composition template="layout/template.xhtml">
  10.                 <ui:define name="body">
  11.                         <rich:panel style="width:400px">
  12.                                 <f:facet name="header">
  13.                                         <h1>Cadastro de Voos</h1>
  14.                                 </f:facet>
  15.                                 <h:form>
  16.                                         Codigo:
  17.                                         <h:inputText value="#{voo.codigo}"/>
  18.                                        
  19.                                         <rich:separator lineType="solid" height="2"/>
  20.                                         <rich:spacer height="20"/>
  21.                                         <rich:panel>
  22.                                                 <f:facet name="header">
  23.                                                         Origem: #{vooHandler.trechoSelecionado.origem.nome}
  24.                                                 </f:facet>
  25.                                                 Dia:
  26.                                                 <rich:calendar value="#{voo.dataPartida}" datePattern="dd/MM/yyyy"/><br/>
  27.                                                 Hora:
  28.                                                 <h:inputText value="#{voo.horaPartida}">
  29.                                                         <f:convertDateTime type="time" pattern="HH:mm"/>
  30.                                                 </h:inputText>                                 
  31.                                         </rich:panel>          
  32.                                         <rich:panel>
  33.                                                 <f:facet name="header">
  34.                                                         Destino: #{vooHandler.trechoSelecionado.destino.nome}
  35.                                                 </f:facet>
  36.                                                 Dia:
  37.                                                 <rich:calendar value="#{voo.dataChegada}" datePattern="dd/MM/yyyy"/><br/>
  38.                                                 Hora:
  39.                                                 <h:inputText value="#{voo.horaChegada}">
  40.                                                         <f:convertDateTime type="time" pattern="HH:mm"/>
  41.                                                 </h:inputText> 
  42.                                        
  43.                                         </rich:panel>
  44.                                        
  45.                                         <rich:spacer height="20"></rich:spacer>
  46.                                         <h:commandButton action="#{vooHandler.salvarVoo}" value="Salvar"/>
  47.                                 </h:form>
  48.                                
  49.                         </rich:panel>
  50.                        
  51.                         <rich:dataTable value="#{voos}" var="v" style="width: 60%">
  52.                                 <f:facet name="header">Voos Cadastrados</f:facet>
  53.                        
  54.                                 <rich:column>
  55.                                         <f:facet name="header">Codigo do voo</f:facet>
  56.                                         #{v.codigo}
  57.                                 </rich:column>
  58.                                 <rich:column>
  59.                                         <f:facet name="header">Partida</f:facet>
  60.                                         <h:outputText value="#{v.dataPartida}">
  61.                                                 <f:convertDateTime type="date" pattern="dd/MM/yyyy"/>                                  
  62.                                         </h:outputText>
  63.                                         <h:outputText value="-"/>
  64.                                         <h:outputText value="#{v.horaPartida}">
  65.                                                 <f:convertDateTime type="time" pattern="HH:mm"/>                                       
  66.                                         </h:outputText>
  67.                                 </rich:column>
  68.                                 <rich:column>
  69.                                         <f:facet name="header">Chegada</f:facet>
  70.                                         <h:outputText value="#{v.dataChegada}">
  71.                                                 <f:convertDateTime type="date" pattern="dd/MM/yyyy"/>                                  
  72.                                         </h:outputText>
  73.                                         <h:outputText value="-"/>
  74.                                         <h:outputText value="#{v.horaChegada}">
  75.                                                 <f:convertDateTime type="time" pattern="HH:mm"/>                                       
  76.                                         </h:outputText>
  77.                                 </rich:column>
  78.                                
  79.                         </rich:dataTable>
  80.  
  81.                 </ui:define>
  82.  
  83.         </ui:composition>
  84.  
  85. </html>