Advertisement
Guest User

Untitled

a guest
Sep 27th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.76 KB | None | 0 0
  1. ?xml version='1.0' encoding='UTF-8' ?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml"
  4. xmlns:h="http://xmlns.jcp.org/jsf/html"
  5. xmlns:f="http://xmlns.jcp.org/jsf/core">
  6. <h:head>
  7. <title>Edit ${administratorManager.currentStudent.username}</title>
  8. </h:head>
  9. <h:body>
  10. <h:form>
  11. <h:panelGrid columns="3">
  12. <h:outputLabel for="username" value="Username: "/>
  13. <h:inputText
  14. id="username"
  15. size="20"
  16. required="true"
  17. value="#{administratorManager.currentStudent.username}"
  18. />
  19.  
  20. <h:message for="username" errorStyle="color: red"/>
  21.  
  22. <h:outputLabel for="password" value="Password: "/>
  23. <h:inputSecret
  24. id="password"
  25. size="20"
  26. required="true"
  27. requiredMessage="Error: Password cannot be empty."
  28. value="#{administratorManager.currentStudent.password}"
  29. />
  30. <h:message for="password" errorStyle="color: red"/>
  31.  
  32. <h:outputLabel for="name" value="Name: "/>
  33. <h:inputText
  34. id="name"
  35. size="20"
  36. required="true"
  37. requiredMessage="Error: Name cannot be empty."
  38. value="#{administratorManager.currentStudent.name}"
  39. />
  40. <h:message for="name" errorStyle="color: red"/>
  41.  
  42. <h:outputLabel for="email" value="Email: "/>
  43. <h:inputText
  44. id="email"
  45. size="20"
  46. required="true"
  47. requiredMessage="Error: Email cannot be empty."
  48. validatorMessage="Error: Email is invalid."
  49. value="#{administratorManager.currentStudent.email}"
  50. >
  51. <f:validateRegex pattern="[\w\.-]*[a-zA-Z0-9_]@[\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]" />
  52. </h:inputText>
  53. <h:message for="email" errorStyle="color: red"/>
  54.  
  55. <span>
  56. <h:link value="Return" outcome="index"></h:link>
  57. </span>
  58.  
  59. <h:commandButton
  60. id="submit"
  61. value="Create"
  62. action="#{administratorManager.updateStudent}"/>
  63. <h:message for="submit" style="color: red" />
  64. </h:panelGrid>
  65. </h:form>
  66. </h:body>
  67. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement