Advertisement
Guest User

Untitled

a guest
Dec 19th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.99 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>Facelet Title</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. requiredMessage="Error: Usename cannot be empty"
  18. value="#{administratorManager.newStudentUsername}" />
  19. <h:message for="username" errorStyle="color:red" />
  20.  
  21. <h:outputLabel for="password" value="Password: "/>
  22. <h:inputSecret
  23. id="password"
  24. size="20"
  25. required="true"
  26. requiredMessage="Error: Password cannot be empty"
  27. value="#{administratorManager.newStudentPassword}" />
  28. <h:message for="password" errorStyle="color:red" />
  29.  
  30. <h:outputLabel for="name" value="Name: "/>
  31. <h:inputText
  32. id="name"
  33. size="20"
  34. required="true"
  35. requiredMessage="Error: Name cannot be empty"
  36. value="#{administratorManager.newStudentName}" />
  37. <h:message for="name" errorStyle="color:red" />
  38.  
  39. <h:outputLabel for="email" value="Email "/>
  40. <h:inputText
  41. id="email"
  42. size="20"
  43. required="true"
  44. requiredMessage="Error: Email cannot be empty"
  45. value="#{administratorManager.newStudentEmail}" >
  46. <f:validateRegex pattern="[\w\.-]*[a-zA-Z0-9_]@[\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]" />
  47. </h:inputText>
  48. <h:message for="email" errorStyle="color:red" />
  49. <h:outputLabel for="course" value="Course: " />
  50. <h:selectOneMenu
  51. id="course"
  52. value="#{administratorManager.newStudentCourseCode}" >
  53. <f:selectItems
  54. value="#{administratorManager.allCourses}"
  55. var="course"
  56. itemValue="#{course.code}"
  57. itemLabel="#{course.name}" />
  58. </h:selectOneMenu>
  59.  
  60. <br></br>
  61. <h:commandButton
  62. id="submit"
  63. value="Create"
  64. action="#{administratorManager.createStudent()}" />
  65.  
  66. </h:panelGrid>
  67. </h:form>
  68. </h:body>
  69. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement