blob: 7bef5787ce7a150460081f2e46695bd9843d7540 [file]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets">
<head>
<title>OpenWebBeans :: Examples :: Reservation</title>
<link type="text/css" rel="stylesheet" href="#{facesContext.externalContext.requestContextPath}/main.css"/>
</head>
<body>
<div id="main">
<h:messages globalOnly="false" showSummary="true" infoClass="message infoMessage" errorClass="message errorMessage"></h:messages>
<div class="caption">
<h:outputText value="New User Register" />
</div>
<h:form id="form">
<h:panelGrid columns="2" styleClass="table" cellspacing="2" cellpadding="5" columnClasses="leftColumns,rightColumns">
<h:outputLabel for="name">
<h:outputText value="Name" />
</h:outputLabel>
<h:inputText value="#{register.name}" id="name" required="true" requiredMessage="Name is required!"/>
<h:outputLabel for="surname">
<h:outputText value="Surname" />
</h:outputLabel>
<h:inputText value="#{register.surname}" id="surname" required="true" requiredMessage="Surname is required!"/>
<h:outputLabel for="age">
<h:outputText value="Age" />
</h:outputLabel>
<h:inputText value="#{register.age}" id="age" required="true" requiredMessage="Age is required">
</h:inputText>
<h:outputLabel for="userName">
<h:outputText value="User Name" />
</h:outputLabel>
<h:inputText value="#{register.userName}" id="userName" required="true" requiredMessage="User name is required and minumum 8 characters!">
<f:validateLength minimum="8" maximum="50"/>
</h:inputText>
<h:outputLabel for="password">
<h:outputText value="Password" />
</h:outputLabel>
<h:inputSecret value="#{register.password}" id="password" required="true" requiredMessage="Password must be minumum 4 and maximum 8 characters!">
<f:validateLength minimum="4" maximum="20"/>
</h:inputSecret>
<h:outputLabel for="admin">
<h:outputText value="Admin Authorization" />
</h:outputLabel>
<h:selectBooleanCheckbox value="#{register.admin}">
</h:selectBooleanCheckbox>
<h:commandButton action="#{register.register}" value="Register" />
<h:commandButton action="false" value="Clear Form" immediate="true" onclick="document.forms[0].reset();document.getElementById('form:name').focus();return false;" />
</h:panelGrid>
</h:form>
</div>
</body>
</html>