Guest User

Untitled

a guest
Feb 12th, 2018
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.75 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:outputStylesheet library="css" name="main.css" />
  11. <meta name="viewport" content="width=device-width, initial-scale=1"></meta>
  12. <link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css"></link>
  13.  
  14. <div class="signup">
  15.  
  16. <h:form>
  17.  
  18. <h1><h:outputText value="Sign up"/></h1>
  19. <h7 style="display: #{userMB.hasError() ? 'block' : 'none'};color: red;"><h:outputText style="color: red;" />The username is already taken ...</h7>
  20.  
  21. <h:panelGrid columns="1">
  22. <h:outputLabel value="Firstname:" for="firstname" />
  23. <h:inputText id="firstname" value="#{userMB.user.firstname}" title="Firstname" />
  24. <h:outputLabel value="Lastname:" for="lastname" />
  25. <h:inputText id="lastname" value="#{userMB.user.lastname}" title="Lastname" />
  26. <h:outputLabel value="Age:" for="age" />
  27. <h:inputText id="age" value="#{userMB.user.age}" title="Age" />
  28. <h:outputLabel value="Type : " for="type" />
  29. <h:selectOneMenu value="#{userMB.user.userType}">
  30. <f:selectItem itemValue = "student" itemLabel = "Student" />
  31. <f:selectItem itemValue = "instructor" itemLabel = "Instructor" />
  32. <f:selectItem itemValue = "parent" itemLabel = "Parent" />
  33. <f:selectItem itemValue = "admin" itemLabel = "Admin" />
  34. </h:selectOneMenu>
  35. <h:outputLabel value="Password:" for="password" />
  36. <h:inputSecret id="password" value="#{userMB.user.password}" title="Password" />
  37. <h:outputLabel value="Username:" for="username" />
  38. <h:inputText id="username" value="#{userMB.user.username}" title="Username" />
  39. <h:outputLabel value="Discipline:" for="discipline" />
  40. <h:inputText id="discipline" value="#{userMB.user.discipline}" title="Discipline" />
  41. <h:commandButton value="create" action="#{userMB.createUser()}"></h:commandButton>
  42. </h:panelGrid>
  43. </h:form>
  44.  
  45. </div>
  46.  
  47.  
  48. </h:body>
  49. </html>
Add Comment
Please, Sign In to add comment