Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version='1.0' encoding='UTF-8' ?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:h="http://xmlns.jcp.org/jsf/html"
- xmlns:f="http://xmlns.jcp.org/jsf/core">
- <h:head>
- <title>Facelet Title</title>
- </h:head>
- <h:body>
- <h:form>
- <h:panelGrid columns="3">
- <h:outputLabel for="username" value="Username: "/>
- <h:inputText
- id="username"
- size="20"
- required="true"
- requiredMessage="Error: Usename cannot be empty"
- value="#{administratorManager.newStudentUsername}" />
- <h:message for="username" errorStyle="color:red" />
- <h:outputLabel for="password" value="Password: "/>
- <h:inputSecret
- id="password"
- size="20"
- required="true"
- requiredMessage="Error: Password cannot be empty"
- value="#{administratorManager.newStudentPassword}" />
- <h:message for="password" errorStyle="color:red" />
- <h:outputLabel for="name" value="Name: "/>
- <h:inputText
- id="name"
- size="20"
- required="true"
- requiredMessage="Error: Name cannot be empty"
- value="#{administratorManager.newStudentName}" />
- <h:message for="name" errorStyle="color:red" />
- <h:outputLabel for="email" value="Email "/>
- <h:inputText
- id="email"
- size="20"
- required="true"
- requiredMessage="Error: Email cannot be empty"
- value="#{administratorManager.newStudentEmail}" >
- <f:validateRegex pattern="[\w\.-]*[a-zA-Z0-9_]@[\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]" />
- </h:inputText>
- <h:message for="email" errorStyle="color:red" />
- <h:outputLabel for="course" value="Course: " />
- <h:selectOneMenu
- id="course"
- value="#{administratorManager.newStudentCourseCode}" >
- <f:selectItems
- value="#{administratorManager.allCourses}"
- var="course"
- itemValue="#{course.code}"
- itemLabel="#{course.name}" />
- </h:selectOneMenu>
- <br></br>
- <h:commandButton
- id="submit"
- value="Create"
- action="#{administratorManager.createStudent()}" />
- </h:panelGrid>
- </h:form>
- </h:body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement