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>Update Student</title>
- </h:head>
- <h:body>
- <p>Update Student </p>
- <h:form>
- <h:panelGrid columns="3">
- <h:outputLabel for="username" value="Username:" />
- <h:message for="username" errorStyle="color:red"/>
- <br></br>
- <h:outputLabel for="password" value="Password:" />
- <h:inputSecret id="password" size="20" required="true" requiredMessage="Error: Password cannot be empty!" value="#{administratorManager.currentStudent.password}"/>
- <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.currentStudent.name}"/>
- <h:message for="name" errorStyle="color:red"/>
- <h:outputLabel for="email" value="Email:" />
- <h:inputText id="email" size="20" required="true" requiredMessage="Error: Mail cannot be empty!" value="#{administratorManager.currentStudent.email}" validatorMessage="Error: Wrong email format!">
- <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"/>
- <br></br>
- <h:commandButton id="submit" value="Update" action="#{administratorManager.updateStudent()}" />
- <h:message for="submit" errorStyle="color:red" />
- </h:panelGrid>
- </h:form>
- <br></br>
- <h:link value="Return" outcome="index"/>
- </h:body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement