create.xhtml 1.39 KB
<!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:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">
    <h:head>
        <title></title>
    </h:head>
 <h:body>
 <ui:composition template="/layout/default-template.xhtml">
		<ui:define name="title">CreateUser</ui:define>
		<ui:define name="header">Add new user</ui:define>
		<ui:define name="content">
		
			
		<h:panelGrid comluns="2">
			<h:outputLabel value="Nick:" /><h:inputText value="#{userView.nick}" />
			<h:outputLabel value="Real name" /><h:inputText value="#{userView.Realname}" />
			<h:outputLabel value="Address" /><h:inputText value="#{userView.address}" />
			<h:outputLabel value="Zip Code" /><h:inputText value="#{userView.zip}" />
			<h:outputLabel value="Town" /><h:inputText value="#{userView.town}" />
			<h:outputLabel value="Sex" />
			<h:selectOneRadio id="sex" value="#{userView.female}">  
				<f:selectItem id="male" itemLabel="Male" itemValue="male" />
				<f:selectItem id="female" itemLabel="Female" itemValue="female" />
			</h:selectOneRadio>
			<h:commandButton action="#{userView.saveUser()}" value="Save" />
		</h:panelGrid>
		
		</ui:define>
		<ui:define name="footer">footer</ui:define>
	</ui:composition>
</h:body>
    </html>