Advertisement
Guest User

Untitled

a guest
May 27th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.96 KB | None | 0 0
  1. <!DOCTYPE html>
  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:p="http://primefaces.org/ui">
  7. <h:head>
  8. <title>Sistema de Integração Moriah</title>
  9. <style type="text/css">
  10. #painel {
  11. font-family: geneva, arial, helvetica, sans-serif;
  12. font-size: 100%;
  13. margin-top: 220px;
  14. margin-left: 300px;
  15. margin-right: 300px;
  16. text-align: center;
  17. }
  18.  
  19. #form {
  20. padding-left: 60px;
  21. }
  22.  
  23. </style>
  24. </h:head>
  25. <body>
  26. <ui:decorate template="menubardecorate.xhtml"></ui:decorate>
  27. <p:panel header="Selecione como deseja as Ordens de Serviço" id="painel">
  28. <h:form id="form">
  29. <h:panelGrid columns="5">
  30. <p:outputLabel value="Datas da OS:" />
  31. <p:outputLabel for="de" value="De:" />
  32. <p:calendar id="de" value="#{ListaOsBean.dataDe}" mindate="01/01/10" maxdate="" update="ate" />
  33. <p:outputLabel for="ate" value="Até:" />
  34. <p:calendar id="ate" value="{ListaOsBean.dataAte}" mindate="#{ListaOsBean.getDataDe()}" maxdate="" />
  35. </h:panelGrid>
  36. </h:form>
  37. </p:panel>
  38. </body>
  39. </html>
  40.  
  41. package br.com.moriahitg.bean;
  42.  
  43. import br.com.moriahitg.dao.SZA990DAO;
  44. import br.com.moriahitg.modelo.SZA990;
  45.  
  46. import java.util.ArrayList;
  47. import java.util.Date;
  48. import java.util.List;
  49.  
  50. import javax.faces.bean.ManagedBean;
  51. import javax.faces.bean.SessionScoped;
  52. import javax.faces.context.FacesContext;
  53.  
  54. import javax.servlet.http.HttpServletRequest;
  55. import javax.servlet.http.HttpSession;
  56.  
  57. @ManagedBean
  58. @SessionScoped
  59. public class ListaOsBean {
  60.  
  61. List<SZA990> list = new ArrayList<SZA990>();
  62. Date dataDe;
  63. String dataDeS, dataAteS;
  64.  
  65. @SuppressWarnings("unchecked")
  66. public String addOSNaListaPorCliente() {
  67. HttpServletRequest request = (HttpServletRequest) FacesContext.getCurrentInstance().getExternalContext()
  68. .getRequest();
  69. HttpSession session = request.getSession(true);
  70. String a1_cod = (String) session.getAttribute("A1_COD");
  71. SZA990DAO szadao = new SZA990DAO();
  72. list = szadao.getOSPorCliente(a1_cod);
  73. return "/listaDeOSs.xhtml?faces-redirect=true";
  74. }
  75.  
  76. public List<SZA990> getList() {
  77. return list;
  78. }
  79.  
  80. public void setList(List<SZA990> list) {
  81. this.list = list;
  82. }
  83.  
  84. public Date getDataDe() {
  85. return dataDe;
  86. }
  87.  
  88. public void setDataDe(Date dataDe) {
  89. this.dataDe = dataDe;
  90. }
  91.  
  92. // public Date getDataAte() {
  93. // return dataAte;
  94. // }
  95.  
  96. // public void setDataAte(Date dataAte) {
  97. // this.dataAte = dataAte;
  98. // }
  99.  
  100. public String getDataDeS() {
  101. return dataDeS;
  102. }
  103.  
  104. public void setDataDeS(String dataDeS) {
  105. this.dataDeS = dataDeS;
  106. }
  107.  
  108. public String getDataAteS() {
  109. return dataAteS;
  110. }
  111.  
  112. public void setDataAteS(String dataAteS) {
  113. this.dataAteS = dataAteS;
  114. }
  115.  
  116. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement