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:ui="http://xmlns.jcp.org/jsf/facelets"
- xmlns:h="http://xmlns.jcp.org/jsf/html"
- xmlns:f="http://xmlns.jcp.org/jsf/core">
- <body>
- <ui:composition template="./layout/default2.xhtml">
- <f:metadata>
- <f:viewParam name="cId" value="#{customerManagedBean.cId}" />
- <f:event type="preRenderView" listener="#{customerManagedBean.loadSelectedCustomer}"/>
- </f:metadata>
- <ui:define name="title">
- Manage Customer
- </ui:define>
- <ui:define name="content">
- <!-- Content Header (Page header) -->
- <section class="content-header">
- <h1>
- Manage Customer
- </h1>
- <ol class="breadcrumb">
- <li><a href="./"><i class="fa fa-dashboard"></i> Home</a></li>
- <li class="active">#{customerManagedBean.selectedCustomer == null ? 'Create New Customer' : 'Edit Customer'}</li>
- </ol>
- </section>
- <!-- Main content -->
- <section class="content">
- <!-- Horizontal Form -->
- <div class="box box-info">
- <div class="box-header with-border">
- <h3 class="box-title">#{customerManagedBean.selectedCustomer == null ? 'Create New Customer' : 'Edit Customer'}</h3>
- </div>
- <!-- /.box-header -->
- <!-- form start -->
- <h:form class="form-horizontal">
- <div class="box-body">
- <div class="form-group #{inputName.valid ? '' :'has-error'}">
- <label for="inputName" class="col-sm-2 control-label">Name</label>
- <div class="col-sm-10">
- <h:inputText binding="#{inputName}" id="inputName" value="#{customerManagedBean.name}" required="true" requiredMessage="Name is required" class="form-control" />
- <h:message for="inputName" class="help-block"/>
- </div>
- </div>
- <div class="form-group">
- <label class="col-sm-2 control-label">Gender</label>
- <div class="col-sm-10">
- <h:selectOneMenu value="#{customerManagedBean.gender}" class="form-control">
- <f:selectItem itemValue = "1" itemLabel = "Female" />
- <f:selectItem itemValue = "2" itemLabel = "Male" />
- </h:selectOneMenu>
- </div>
- </div>
- <div class="form-group #{inputDOB.valid ? '' :'has-error'}">
- <label class="col-sm-2 control-label">Date of Birth <br />(dd/mm/yyyy)</label>
- <div class="col-sm-10">
- <div class="input-group date">
- <div class="input-group-addon">
- <i class="fa fa-calendar"></i>
- </div>
- <h:inputText binding="#{inputDOB}" id="inputDOB" value="#{customerManagedBean.dob}" required="true" requiredMessage="DOB is required" converterMessage="Format should be dd/mm/yyy" class="form-control pull-right datepicker">
- <f:convertDateTime pattern="dd/MM/yyy" />
- </h:inputText>
- </div>
- <h:message for="inputDOB" class="help-block"/>
- </div>
- </div>
- </div>
- <!-- /.box-body -->
- <div class="box-footer">
- <h:button value="Cancel" class="btn btn-default" outcome="searchCustomers2" />
- <h:commandButton value="Submit" class="btn btn-info pull-right" actionListener="#{customerManagedBean.submitAction}" action="searchCustomers2?faces-redirect=true"/>
- </div>
- <!-- /.box-footer -->
- </h:form>
- </div>
- <!-- /.box -->
- </section>
- <!-- /.content -->
- </ui:define>
- <ui:define name="script">
- <script>
- //Date picker
- $('.datepicker').datepicker({
- autoclose: true,
- format: 'dd/mm/yyyy',
- orientation: 'bottom left'
- })
- </script>
- </ui:define>
- </ui:composition>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement