21
 Introducción PrimeFaces es una biblioteca ligera con un frasco, sin configuración y sin dependencias requeridas. Sólo tienes que descargar PrimeFaces, agregue el PrimeFaces-{version}. ar a la ruta de clases e importar el espacio de nombres para empe!ar. "os espacios de nombres PrimeFaces espacio de nombres es necesario a#adir componentes PrimeFaces a sus p$ginas. la vis ta de impres ión ? 1. xmlns: p = "http://primefaces.org/ui"  Para PrimeFaces %obile, el espacio de nombres ser&a' la vis ta de impres ión ? 1. xmlns: p = "http://primefaces.org/mobile"  (ecución de pruebas (so es todo, a)ora usted puede agregar un componente de prueba para ver si todo est$ bien. la vis ta de impres ión ? 1.  < HTML xmlns = "http://www.w3.org/1999/xhtml"  2. xmlns: h = "http://java.sun.com/jsf/html"  3. xmlns: f = "http://java.sun.com/jsf/core"  . xmlns: p = "http://primefaces.org/ui" > !. . < h: head > #. $. </ h: head > 9. 1%. < h: body > 11. 12. < p: spinner /> 13. 1. </ h: body > 1!. </ HTML > 1. <h:form i&="form"> 1#. 1$. <p:panel hea&er="'artial 'rocess"> 19.

Introducción Java Ibernates

Embed Size (px)

DESCRIPTION

tutorial de java ibernates

Citation preview

Introduccin

PrimeFaces es una biblioteca ligera con un frasco, sin configuracin y sin dependencias requeridas.Slo tienes quedescargarPrimeFaces, agregue el PrimeFaces-{version}. jar a la ruta de clases e importar el espacio de nombres para empezar.

Los espacios de nombres

PrimeFaces espacio de nombres es necesario aadir componentes PrimeFaces a sus pginas.

la vista

HYPERLINK "http://www.primefaces.org/gettingStarted.html" de impresin

HYPERLINK "http://www.primefaces.org/gettingStarted.html" ?1. xmlns: p="http://primefaces.org/ui"Para PrimeFaces Mobile, el espacio de nombres sera;

la vista

HYPERLINK "http://www.primefaces.org/gettingStarted.html" de impresin

HYPERLINK "http://www.primefaces.org/gettingStarted.html" ?1. xmlns: p="http://primefaces.org/mobile"Ejecucin de pruebas

Eso es todo, ahora usted puede agregar un componente de prueba para ver si todo est bien.

la vista

HYPERLINK "http://www.primefaces.org/gettingStarted.html" de impresin

HYPERLINK "http://www.primefaces.org/gettingStarted.html" ?1. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 28. 29. 30. 33. 34. 35. 36. 37. 38. 40. 42. 44. 46. 48. 50. 51. 52. 53. 54. packageorg.primefaces.examples.view;55. 56. importjavax.faces.application.FacesMessage;57. importjavax.faces.context.FacesContext;58. importjavax.faces.event.ActionEvent;59. 60. publicclassPersonBean{61. 62. privateStringfirstname;63. 64. privateStringsurname;65. 66. publicStringgetFirstname(){67. returnfirstname;68. }69. publicvoidsetFirstname(Stringfirstname){70. this.firstname=firstname;71. }72. 73. publicStringgetSurname(){74. returnsurname;75. }76. publicvoidsetSurname(Stringsurname){77. this.surname=surname;78. }79. 80. publicvoidsavePerson(ActionEventactionEvent){81. FacesContext.getCurrentInstance().addMessage(null,newFacesMessage("Welcome"+firstname+""+surname+"!"));82. }Validar datos1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. ,,,,,,,,,,,,,,,,,,,,,,,,,28. 29. packageorg.primefaces.examples.view;30. 31. importjavax.faces.application.FacesMessage;32. importjavax.faces.context.FacesContext;33. importjavax.faces.event.ActionEvent;34. 35. publicclassPersonBean{36. 37. privateStringfirstname;38. 39. privateStringsurname;40. 41. publicStringgetFirstname(){42. returnfirstname;43. }44. publicvoidsetFirstname(Stringfirstname){45. this.firstname=firstname;46. }47. 48. publicStringgetSurname(){49. returnsurname;50. }51. publicvoidsetSurname(Stringsurname){52. this.surname=surname;53. }54. 55. publicvoidsavePerson(ActionEventactionEvent){56. FacesContext.getCurrentInstance().addMessage(null,newFacesMessage("Welcome"+firstname+""+surname+"!"));57. }58. }Diseo teclado1. 2. 3. 4. 5. 6. 7. 8. 9. 11. 12. 13. 15. 16. 17. 20. 21. 22. 25. 26. 27. 28. 29. 30. 32. 33. 34. 38. 39. 40. 42. 43. 44. 45. 46. 47. 48. 49. 50. 51. 52. 53. 54. 55. 56. 57. 58. 59. 60. 61. 62. 63. 64. 65. 66. 67. 68. 69. 70. 71. 72. 73. 74. 75. 76. 77. 78. 79. 80. packageorg.primefaces.examples.view;81. 82. publicclassKeyboardBean{83. 84. privateStringvalue1;85. 86. privateStringvalue2;87. 88. privateStringvalue3;89. 90. privateStringvalue4;91. 92. privateStringvalue5;93. 94. privateStringvalue6;95. 96. privateStringvalue7;97. 98. privateStringvalue8;99. 100. privateStringvalue9;101. 102. publicStringgetValue1(){103. returnvalue1;104. }105. 106. publicvoidsetValue1(Stringvalue1){107. this.value1=value1;108. }109. 110. publicStringgetValue2(){111. returnvalue2;112. }113. 114. publicvoidsetValue2(Stringvalue2){115. this.value2=value2;116. }117. 118. publicStringgetValue3(){119. returnvalue3;120. }121. 122. publicvoidsetValue3(Stringvalue3){123. this.value3=value3;124. }125. 126. publicStringgetValue4(){127. returnvalue4;128. }129. 130. publicvoidsetValue4(Stringvalue4){131. this.value4=value4;132. }133. 134. publicStringgetValue5(){135. returnvalue5;136. }137. 138. publicvoidsetValue5(Stringvalue5){139. this.value5=value5;140. }141. 142. publicStringgetValue6(){143. returnvalue6;144. }145. 146. publicvoidsetValue6(Stringvalue6){147. this.value6=value6;148. }149. 150. publicStringgetValue7(){151. returnvalue7;152. }153. 154. publicvoidsetValue7(Stringvalue7){155. this.value7=value7;156. }157. 158. publicStringgetValue8(){159. returnvalue8;160. }161. 162. publicvoidsetValue8(Stringvalue8){163. this.value8=value8;164. }165. 166. publicStringgetValue9(){167. returnvalue9;168. }169. 170. publicvoidsetValue9(Stringvalue9){171. this.value9=value9;172. }173. }174. Men1. 2. 3. DefaultMegaMenu4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. Sopranos36. 37. 38. 39. 40. 41. 42. 43. 44. 45. 46. 47. 48. 49. 50. 51. 52. 53. 54. 55. 56. 57. 58. 59. 60. 61. 62. 63. 64. 65. 66. 67. 68. 69. 70. 71. 72. 73. 74. 75. 76. 77. 78. 79. 80. 81. 82. 83. 84. 85. 86. 87. 88. 89. 90. 91. 92. 93. 94. 95. 96. 97. 98. 99. 100. 101. 102. 103. 104. 105. 106. 107. 108. 109. 110. 111. 112. 113. 114. 115. 116. 117. 118. 119. 120. 121. 122. 123. 124. 125. 126. 127. 128. 129. 130. 131. 132. 133. 134. 135. 136. 137. 138. 139. 140. 141. 142. 143. 144. 145. 146. 147. 148. 149. 150. ClickTrigger151. 152. //Sameasdefaultmegamenu153. 154. 155.

1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. Menubar1. 2. 3. 4. 5. DefaultMenubar6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. 37. 38. 39. 40. 41. 42. 43. 44. 45. 46. 47. 48. 49. 50. ClickTrigger51. 52. //samecontentasdefaultmenubar53. 54. 55. 56. 57. packageorg.primefaces.examples.view;58. 59. importjavax.faces.application.FacesMessage;60. importjavax.faces.context.FacesContext;61. 62. publicclassMenuBean{63. 64. publicvoidsave(){65. addMessage("Datasaved");66. }67. 68. publicvoidupdate(){69. addMessage("Dataupdated");70. }71. 72. publicvoiddelete(){73. addMessage("Datadeleted");74. }75. 76. publicvoidaddMessage(Stringsummary){77. FacesMessagemessage=newFacesMessage(FacesMessage.SEVERITY_INFO,summary,null);78. FacesContext.getCurrentInstance().addMessage(null,message);79. }80. }Menustack

view plain

HYPERLINK "http://www.primefaces.org/showcase/ui/stack.jsf" copy to clipboard

HYPERLINK "http://www.primefaces.org/showcase/ui/stack.jsf" print

HYPERLINK "http://www.primefaces.org/showcase/ui/stack.jsf" ?1. 2. 3. 4. 5. 6. 7. 8. Mesage

1. 2. 3. Messages4. 5. 6. 7. 8. 9. 10. 11. 12. 13. Message14. 15. 16. 17. 18. 19. 20. 21. 22. 23. 24. 25. 26. 27. 28. 29. 30. 31. 32. 33. 34. 35. 36. packageorg.primefaces.examples.view;37. 38. importjavax.faces.event.ActionEvent;39. importjavax.faces.context.FacesContext;40. importjavax.faces.application.FacesContext;41. 42. publicclassMessagesController{43. 44. publicvoidaddInfo(ActionEventactionEvent){45. FacesContext.getCurrentInstance().addMessage(null,newFacesMessage(FacesMessage.SEVERITY_INFO,"Sampleinfomessage","PrimeFacesrocks!"));46. }47. 48. publicvoidaddWarn(ActionEventactionEvent){49. FacesContext.getCurrentInstance().addMessage(null,newFacesMessage(FacesMessage.SEVERITY_WARN,"Samplewarnmessage","WatchoutforPrimeFaces!"));50. }51. 52. publicvoidaddError(ActionEventactionEvent){53. FacesContext.getCurrentInstance().addMessage(null,newFacesMessage(FacesMessage.SEVERITY_ERROR,"Sampleerrormessage","PrimeFacesmakesnomistakes"));54. }55. 56. publicvoidaddFatal(ActionEventactionEvent){57. FacesContext.getCurrentInstance().addMessage(null,newFacesMessage(FacesMessage.SEVERITY_FATAL,"Samplefatalmessage","FatalErrorinSystem"));58. }59. }