Advertisement
Guest User

Untitled

a guest
Sep 26th, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.07 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>Update Student</title>
  8. </h:head>
  9. <h:body>
  10. <p>Update Student </p>
  11. <h:form>
  12. <h:panelGrid columns="3">
  13. <h:outputLabel for="username" value="Username:" />
  14. <h:message for="username" errorStyle="color:red"/>
  15. <br></br>
  16.  
  17. <h:outputLabel for="password" value="Password:" />
  18. <h:inputSecret id="password" size="20" required="true" requiredMessage="Error: Password cannot be empty!" value="#{administratorManager.currentStudent.password}"/>
  19. <h:message for="password" errorStyle="color:red"/>
  20.  
  21. <h:outputLabel for="name" value="Name:" />
  22. <h:inputText id="name" size="20" required="true" requiredMessage="Error: Name cannot be empty!" value="#{administratorManager.currentStudent.name}"/>
  23. <h:message for="name" errorStyle="color:red"/>
  24.  
  25. <h:outputLabel for="email" value="Email:" />
  26. <h:inputText id="email" size="20" required="true" requiredMessage="Error: Mail cannot be empty!" value="#{administratorManager.currentStudent.email}" validatorMessage="Error: Wrong email format!">
  27. <f:validateRegex pattern="[\w\.-]*[a-zA-Z0-9_]@[\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]" />
  28. </h:inputText>
  29.  
  30. <h:message for="email" errorStyle="color:red"/>
  31.  
  32. <br></br>
  33.  
  34. <h:commandButton id="submit" value="Update" action="#{administratorManager.updateStudent()}" />
  35. <h:message for="submit" errorStyle="color:red" />
  36. </h:panelGrid>
  37. </h:form>
  38.  
  39. <br></br>
  40. <h:link value="Return" outcome="index"/>
  41. </h:body>
  42. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement