JSF Primefaces form errors after failed validation - ajax

I am new to JSF/Java in general but have been trying to solve this for a few days now.
I have a form which gets stuck on validation. When all the entries are valid, it all works well. The minute I break validation (such as don't provide a required value), then the form gets stuck. One thing that happens is I cant correct the invalid entry it seems and repost. Also, where I had a cascading ajax call of a selectOneMenu, that suddenly starts failing...even though this is not the invalidated part of the form.
I notice that the cascading drop down seems to be throwing null pointer exceptions in its overridden equals method.
I am at a loss.
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.org/ui"
xmlns:ui="http://java.sun.com/jsf/facelets">
<ui:composition template="/templates/layout.xhtml">
<ui:define name="content">
<p:ajaxStatus onstart="statusDialog.show();" onsuccess="statusDialog.hide();"/>
<p:dialog modal="true" widgetVar="statusDialog" header="Status"
draggable="false" closable="false">
<p:graphicImage value="/resources/images/ajaxloadingbar.gif" />
</p:dialog>
<h:form id="form">
<p:panel id="panel"
header="Please ensure your personal details are accurate"
style="margin-bottom:10px;">
<p:messages id="msgs" />
<h:outputText
value="Please ensure your personal details are up to date and accurate within the Admin Direct system. Please note that this application only supports GMD customers, so unless you are within GMD, or are a user of the GMD Admin Direct service, please do not enter your details or attempt to use the application for administrative support." />
<h:panelGrid columns="3" cellpadding="5" id="grid">
<h:outputText value="First Name:" style="font-weight:bold" />
<p:inputText id="firstName"
value="#{personalDetailsBean.user.firstName}"
requiredMessage="First name is required..." style="width:250px" />
<p:message id="firstNameMessage" for="firstName" />
<h:outputText value="Last Name:" style="font-weight:bold" />
<p:inputText id="lastName"
value="#{personalDetailsBean.user.lastName}"
requiredMessage="Last name is required..." style="width:250px" />
<p:message id="lastNameMessage" for="lastName" />
<h:outputText value="Select Function:" style="font-weight:bold" />
<p:selectOneMenu id="functions"
value="#{personalDetailsBean.user.function}"
style="width:250px">
<f:selectItem itemLabel="Select Function" itemValue="" />
<f:selectItems value="#{personalDetailsBean.functions}" var="func"
itemLabel="#{func.functionName}" itemValue="#{func}" />
<f:converter converterId="functionConverter" />
</p:selectOneMenu>
<p:message id="functionMessage" for="functions" />
<h:outputText value="Select Site" style="font-weight:bold" />
<p:selectOneMenu id="sites"
value="#{personalDetailsBean.user.site}"
style="width:250px">
<f:selectItem itemLabel="Select Site" itemValue="" />
<f:selectItems value="#{personalDetailsBean.sites}" var="sit"
itemLabel="#{sit.siteName}" itemValue="#{sit}" />
<f:converter converterId="siteConverter" />
<p:ajax update="region" event="change" process="#this"/>
</p:selectOneMenu>
<p:message id="siteMessage" for="sites" />
<h:outputText value="Region" style="font-weight:bold" />
<h:outputText id="region"
value="#{personalDetailsBean.user.site.region.regionName}" />
<p:message id="regionMessage" for="region" />
<h:outputText value="Email" style="font-weight:bold" />
<p:inputText id="email" value="#{personalDetailsBean.user.email}"
required="true"
validatorMessage="Invalid email address format"
style="width:250px">
<f:validateRegex
pattern="[\w\.-]*[a-zA-Z0-9_]#[\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]" />
<f:validateLength minimum="2" />
</p:inputText>
<p:message id="emailMessage" for="email" />
</h:panelGrid>
<p:separator />
<p:commandButton value="Save" id="btnSubmit" actionListener="#{personalDetailsBean.saveUser}" process="#all" update="panel" />
</p:panel>
</h:form>
</ui:define>
</ui:composition>
</html>
any advice greatly appreciated.
Regards
SM

Related

My form inside a dialog keeps values when i re-open dialog

i am using a form inside a dialog to edit some data , i use setPropertyActionListener tag to get this data from a dataTable , my form shows correctly all fields , but when i change some data and close the dialog and reopen it (without submuting) the form keeps the latest data and ignore what is coming from setPropertyActionListener
here is my code used to open the dialog
<p:menuButton value="Actions">
<p:menuitem resetValues="true" value="Update"
icon="fa fa-edit" process="#this"
actionListener="#{myMB.resetSelectedEntite(a)}"
update="formUpdateAff:displayEditionAff"
oncomplete="PF('affUpdateDialogWidget').show()">
<f:setPropertyActionListener
target="#{myMB.selectedAffectation}" value="#{a}" />
<f:actionListener
type="com.dummy.AffActionListener" />
</p:menuitem>
code for dialog :
<!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"
xmlns:p="http://primefaces.org/ui">
<h:body>
<p:dialog widgetVar="affUpdateDialogWidget" id="affEditerDialogId"
width="30%" showEffect="explode" hideEffect="explode" modal="true">
<h:form id="formUpdateAff" prependId="true">
<p:panel style="margin-bottom:20px;float:center"
widgetVar="titlePanelWidget" collapsed="true"
styleClass="customTitleBar">
<f:facet name="header">
Update
</f:facet>
</p:panel>
<p:tooltip position="top" />
<h:panelGrid id="displayEditionAff" columns="3" cellpadding="4">
<p:outputLabel value="" />
<h:inputHidden value="#{myMB.selectedAffectation.id}" id="idAff" />
<p:message for="idAff" display="tooltip" />
<p:outputLabel value="Date Aff :" for="dateAffectId" />
<p:calendar value="#{myMB.selectedAffectation.dateAff}"
id="dateAffectId" pattern="dd/MM/yyyy" yearRange="c-10:c+0"
showButtonPanel="true" converter="primefacesCalendarConverter"
required="true" locale="fr" showOn="button" />
<p:message for="dateAffectId" display="tooltip" />
<p:outputLabel value="Ville :" for="villeIdAff" />
<p:selectOneMenu style="width:100%; font-weight:bold"
required="true" id="villeIdAff" appendTo="#this"
value="#{myMB.selectedAffectation.refCompagnie.refGroupement.refVille.id}"
rendered="#{myMB.selectedAffectation.refCompagnie.id != 0}">
<f:selectItem itemLabel="----------------" itemValue="" />
<f:selectItems value="#{lieuUnitMB.selectLieuxByType('VILLE',0)}"
var="a" itemValue="#{a.id}" itemLabel="#{a.libelle}" />
<p:ajax
listener="#{myMB.loadGroupements(myMB.selectedAffectation.refCompagnie.refGroupement.refVille.id , myMB.selectedAffectation.refCompagnie.refGroupement.refCatGroupement.id)}"
update="groupIdAff groupIdxxx" />
</p:selectOneMenu>
<p:selectOneMenu style="width:100%; font-weight:bold"
rendered="#{myMB.selectedAffectation.refCompagnie.id == 0}"
required="true" id="villeId2" appendTo="#this"
value="#{myMB.selectedAffectation.refGroupement.refVille.id}">
<f:selectItem itemLabel="----------------" itemValue="" />
<f:selectItems value="#{lieuUnitMB.selectLieuxByType('VILLE',0)}"
var="a" itemValue="#{a.id}" itemLabel="#{a.libelle}" />
<p:ajax
listener="#{myMB.loadGroupements(myMB.selectedAffectation.refGroupement.refVille.id , myMB.selectedAffectation.refGroupement.refCatGroupement.id)}"
update="groupIdAff groupIdxxx" />
</p:selectOneMenu>
<p:message for="villeId2" display="tooltip" />
<p:outputLabel value="Catégorie Groupement :" for="catIdAff" />
<p:selectOneMenu style="width:100%; font-weight:bold"
required="true" id="catIdAff" appendTo="#this"
value="#{myMB.selectedAffectation.refGroupement.refCatGroupement.id}"
rendered="#{myMB.selectedAffectation.refCompagnie.id == 0}">
<f:selectItem itemLabel="----------------" itemValue="" />
<f:selectItems value="#{repositoryMB.selectRepositories()}" />
<p:ajax
listener="#{myMB.loadGroupements(myMB.selectedAffectation.refGroupement.refVille.id , myMB.selectedAffectation.refGroupement.refCatGroupement.id)}"
update="groupIdAff groupIdxxx" />
</p:selectOneMenu>
<p:selectOneMenu style="width:100%; font-weight:bold"
required="true" id="catId2" appendTo="#this"
value="#{myMB.selectedAffectation.refCompagnie.refGroupement.refCatGroupement.id}"
rendered="#{myMB.selectedAffectation.refCompagnie.id != 0}">
<f:selectItem itemLabel="----------------" itemValue="" />
<f:selectItems value="#{repositoryMB.selectRepositories()}" />
<p:ajax
listener="#{myMB.loadGroupements(myMB.selectedAffectation.refCompagnie.refGroupement.refVille.id , myMB.selectedAffectation.refCompagnie.refGroupement.refCatGroupement.id)}"
update="groupIdAff groupIdxxx" />
</p:selectOneMenu>
<p:message for="catIdAff" display="tooltip" />
<p:outputLabel value="Groupement :" for="groupIdAff" />
<p:selectOneMenu
value="#{myMB.selectedAffectation.refCompagnie.refGroupement.id}"
style="width:100%; font-weight:bold" required="true"
id="groupIdAff" appendTo="#this"
rendered="#{myMB.selectedAffectation.refCompagnie.id != 0}">
<f:selectItem itemLabel="----------------" itemValue="" />
<f:selectItems
value="#{myMB.loadGroupements(myMB.selectedAffectation.refCompagnie.refGroupement.refVille.id , myMB.selectedAffectation.refCompagnie.refGroupement.refCatGroupement.id)}" />
<p:ajax
listener="#{myMB.loadCompagniesUpdate(myMB.selectedAffectation.refGroupement.id)}"
update="displayEditionAff,toto" />
</p:selectOneMenu>
<p:selectOneMenu
value="#{myMB.selectedAffectation.refGroupement.id}"
style="width:100%; font-weight:bold" required="true"
id="groupIdxxx" appendTo="#this"
rendered="#{myMB.selectedAffectation.refCompagnie.id == 0}">
<f:selectItem itemLabel="----------------" itemValue="" />
<f:selectItems
value="#{myMB.loadGroupements(myMB.selectedAffectation.refGroupement.refVille.id , myMB.selectedAffectation.refGroupement.refCatGroupement.id)}" />
<p:ajax
listener="#{myMB.loadCompagniesUpdate(myMB.selectedAffectation.refGroupement.id)}"
update="displayEditionAff,toto" />
</p:selectOneMenu>
<p:message for="groupIdAff" display="tooltip" />
<p:outputLabel value="Compagnie :" for="toto"
binding="#{myMB.uiOutputLabel}"
rendered="#{not empty myMB.compagniesUpdate}" />
<p:selectOneMenu binding="#{myMB.uiOutput}"
rendered="#{not empty myMB.compagniesUpdate}"
value="#{myMB.selectedAffectation.refCompagnie.id}"
style="width:100%; font-weight:bold" required="false" id="toto"
appendTo="#this" immediate="true">
<f:selectItem itemLabel="----------------" itemValue="" />
<f:selectItems
value="#{myMB.loadCompagniesUpdate(myMB.selectedAffectation.refGroupement.id)}" />
</p:selectOneMenu>
<p:message for="toto" display="tooltip"
rendered="#{not empty myMB.compagniesUpdate}"
binding="#{myMB.uiOutputMsg}" />
</h:panelGrid>
<p:spacer />
<p:spacer />
<h:panelGrid columns="2">
<p:commandButton value="Editer" icon="ui-icon-plus"
action="#{myMB.updateEntite()}"
update=":entiteDetailDialogForm:tabsId:formAff:AffTable :messageGrowl :formUpdateAff"
process=":formUpdateAff"
oncomplete="closeDialogIfSucess(xhr, status, args, 'AffUpdateDialogWidget', 'AffEditerDialogId')" />
<p:commandButton value="#{bundle.cancel}" icon="ui-icon-cancel"
actionListener="#{myMB.resetSelectedEntite()}" type="button"
onclick="PF('AffUpdateDialogWidget').hide();" />
</h:panelGrid>
</h:form>
</p:dialog>
</h:body>
</html>
i am using Primefaces 6.1

Validations are not working except first tab of wizard and data loss between tabs

I am trying to use wizard with Primefaces (ViewScoped) . I created the page with 4 tabs. After navigating first tab, user reaches second tab and user enters some values to the input text fields at this second tab page. When the user goes the previous or next tab from second tab and comes back to this second tab all the entered values are lost except first tab. Also validations are not working except first tab.Is there a solution for this problem? Here is my html code:
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition 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"
xmlns:p="http://primefaces.org/ui"
xmlns:c="http://java.sun.com/jsp/jstl/core"
template="template/template.xhtml">
<ui:define name="body">
<h:graphicImage value="resources/myimage.jpg" />
<!-- First Tab -->
<h:form id="form">
<p:growl id="growl" sticky="true" showDetail="true"/>
<p:wizard flowListener="#{myView.onFlowProcess}" widgetVar="wiz">
<p:tab id="person" title="PERSON">
<p:panel header="">
<p:messages />
<h:panelGrid columns="2" columnClasses="label, value">
<h:outputText value="NAME :" />
<p:inputText value="#{myView.user.firstname}" label="Name" validatorMessage="NAME ERROR">
<f:validateRegex pattern="[a-zA-Z]{2,50}+"/>
</p:inputText>
<h:outputText value="SURNAME: *" />
<p:inputText value="#{myView.user.lastname}" label="Surname" validatorMessage="SURNAME ERROR">
<f:validateRegex pattern="[a-zA-Z]{2,60}+"/>
</p:inputText>
<h:outputText value="obligatory" style="color:red;"/>
</h:panelGrid>
</p:panel>
</p:tab>
<!-- ADDRESS -->
<p:tab id="address" title="ADDRESS">
<p:panel header="">
<p:messages />
<h:panelGrid columns="2" columnClasses="label, value">
<h:outputText value="cellular Phone" />
<p:inputMask id="cellularPhone" value="#{myView.user.cellularPhone}" mask="59999999999" required="true" requiredMessage="CELLULAR PHONE CANNOT BE EMPTY"/>
<h:outputText value="Cellular Phone :" style="color:red;" />
<h:outputText value="" />
<h:outputText value="Email :" />
<p:inputText value="#{myView.user.email}" />
<h:panelGrid columns="2" cellpadding="5">
<p:outputLabel for="country" value="country" />
<p:selectOneMenu id="country" value="#{dropDownView.country}" style="width:150px">
<p:ajax listener="#{dropDownView.onCountryChange}" update="city" />
<f:selectItem itemLabel="please Select" itemValue="" noSelectionOption="true" />
<f:selectItems value="#{dropDownView.countries}" />
</p:selectOneMenu>
<p:outputLabel for="city" value="city" />
<p:selectOneMenu id="city" value="#{dropDownView.city}" style="width:150px">
<f:selectItem itemLabel="please Select" itemValue="" noSelectionOption="true" />
<f:selectItems value="#{dropDownView.cities}" />
</p:selectOneMenu>
</h:panelGrid>
<p:separator />
<h:outputText value="obligatory" style="color:red;"/>
</h:panelGrid>
</p:panel>
</p:tab>
<p:tab id="confirm" title="PAYMENT">
<p:panel header="">
<p:commandButton value="SAVE" action="#{myView.save}" update="growl" oncomplete="wiz.next();" process="#this" validateClient="true"/>
</p:panel>
</p:tab>
</p:wizard>
</h:form>
</ui:define>
</ui:composition>

primefaces watermark disappears after disabling and re enabling a text field using p:ajax

I am using p:ajax of primefaces in a p:selectOneRadio, to disable and re-enable form input text fields. these text fields have watermarks which disappear after disabling and they do not appear even after re-enabling them. I could not figure out the problem. please help. The code chunk where it appears is as bellow
<h:outputText
value="#{msg['elicense.contractorLicenseForm.personal.licenseApplied']}"/>
<p:selectOneRadio id="licenseApplied"
value="#{contractorLicenseBean.licenseApplied}">
<f:selectItem itemLabel="Yes" itemValue="1" />
<f:selectItem itemLabel="No" itemValue="0"/>
<p:ajax update="licensePersonName, relationshipPersonName" />
</p:selectOneRadio>
<h:outputText value="When it is yes, it should skip to supervisor details"/>
<h:outputText
value="#{msg['elicense.contractorLicenseForm.personal.licensePersonName']} "/>
<p:inputText id="licensePersonName"
value="#{contractorLicenseBean.licensePersonName}"
required="true"
label="LicensePersonName"
disabled="#{contractorLicenseBean.licenseApplied=='1'}"/>
<p:watermark for="licensePersonName"
value="Person/firm/company on whose Favour License is Sought "
id="watermark2" />
<h:outputText
value="#{msg['elicense.contractorLicenseForm.personal.relationshipPersonName']} "/>
<p:inputText id="relationshipPersonName"
value="#{contractorLicenseBean.relationshipPersonName}"
required="true"
label="RelationshipPersonName"
disabled="#{contractorLicenseBean.licenseApplied=='1'}" />
<p:watermark for="relationshipPersonName"
value="Relationship of the Applicant "
id="watermark3" />
Use a h:panelGroup around your watermarked components and update that h:panelGroup instead of component.
Primefaces binds the watermark to component through JQuery. If you changes/update the component then events bound to that component will not work, that may be the reason for your Issue.
I used primefaces 5.0, and I encountered as your problem. When I put the p:inputText into p:panelGrid and update the panelGrid. The problem was gone.
<h:form>
<p:messages id="messages" showDetail="true"/>
<p:selectOneRadio id="radio" value="#{watermarkView.radio}">
<f:selectItem itemLabel="Yes" itemValue="1" />
<f:selectItem itemLabel="No" itemValue="0"/>
<p:ajax process="radio" update="panelGridInput" />
</p:selectOneRadio>
<h:panelGrid id="panelGridInput"
columns="3" cellpadding="5"
style="margin-bottom:10px">
<h:outputLabel value="Search: "/>
<p:inputText id="keyword"
value="#{watermarkView.keyword}"
required="true"
label="Keyword"
disabled="#{watermarkView.radio eq '1'}"/>
<p:watermark for="keyword"
value="Search with a keyword"
id="watermark" />
<h:outputLabel value="Search: "/>
<p:inputText id="keyword2"
value="#{watermarkView.keyword2}"
required="true"
label="Keyword"
disabled="#{watermarkView.radio eq '1'}"/>
<p:watermark for="keyword2"
value="Search with a keyword"
id="watermark2" />
</h:panelGrid>
<p:commandButton id="regular"
actionListener="#{watermarkView.search}"
value="Regular"
ajax="false" />
<p:commandButton id="ajax"
actionListener="#{watermarkView.search}"
value="Ajax"
onclick="PrimeFaces.cleanWatermarks();"
oncomplete="PrimeFaces.showWatermarks();"
update="messages" />
</h:form>

How to enable my radiobutton with primefaces

enable/disable my selectOneRadio does not work like expected. It only activates after a "submit" and the ajax-direct approach does not work.
When I change the selection (click) to "Group", then the dropDown after the selection keeps being "disabled". It only appears after a "submit", but I like to have direct-ajax function.
<div>
<p:outputPanel id="customPanel" style="margin-bottom:10px">
<p:selectOneRadio id="locationType" value="#{bean.query.locationType}"
required="true" layout="custom">
<f:ajax render="locationGroup locationOrganization">
<f:selectItems value="#{bean.locationTypeSelectItems}"
var="locationTypeItem" itemValue="#{locationTypeItem}" itemLabel="#{msgs[locationTypeItem.label]}" />
</f:ajax>
</p:selectOneRadio>
<h:panelGrid columns="3" cellpadding="5">
<p:radioButton id="option1" for="locationType" itemIndex="0" />
<p:outputLabel for="locationGroup" value="Group"/>
<p:autoComplete id="locationGroup"
value="#{bean.query.locationGroup}"
completeMethod="#{bean.completeGroups}"
var="group"
itemLabel="#{group.description}"
itemValue="#{group}"
converter="org.company.project.presentation.group.GroupConverter"
maxResults="10"
dropdown="true"
cache="true"
disabled="#{bean.locationGroupDisabled}"/>
<p:radioButton id="option2" for="locationType" itemIndex="1" />
<p:outputLabel for="locationOrganization" value="#{msgs.pat_Organization}"/>
<p:autoComplete id="locationOrganization"
value="#{bean.query.locationOrganization}"
completeMethod="#{bean.completeOrganizations}"
var="organization"
itemLabel="#{organization.name}"
itemValue="#{organization}"
converter="org.company.project.presentation.organization.OrganizationConverter"
maxResults="10"
dropdown="true"
cache="true"
disabled="#{bean.locationOrganizationDisabled}"/>
<p:radioButton id="option3" for="locationType" itemIndex="2" />
<p:outputLabel value="All" />
</h:panelGrid>
<p:message for="locationGroup" />
<p:message for="locationOrganization" />
</p:outputPanel>
<p:message for="locationType" />
That's all folks!

Submit button doesn't work correctly with ajax jsf 2.0 onblur validation

I'm trying to implement ajax client side validation with jsf 2.0 (primefaces).
I prefer onblur event rather than ontype, because it seems more user friendly. The problem is: my Register button has to be clicked twice to work correctly when a focus is inside an invalid field. 1st time we click - onblur event happens, 2nd time we click - submit happens (i suggest this is the reason). My code:
<html xmlns="http://www.w3c.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui"
xmlns:ui="http://java.sun.com/jsf/facelets">
<ui:composition template="template.xhtml">
<ui:define name="content">
<p:panel header="#{msg['register']}" style="width: 550px; align: left;">
<h:form>
<h:panelGrid columns="3" cellpadding="2">
<h:outputLabel for="name" value="#{msg['yourName']}:" />
<p:inputText id="name" value="#{userManagedBean.name}">
<f:validateLength maximum="20" />
<p:ajax update="msgName" event="blur" />
</p:inputText>
<p:message for="name" id="msgName" display="text"/>
<h:outputLabel for="userName" value="*#{msg['login']}:"/>
<p:inputText id="userName" value="#{userManagedBean.username}" label="UserName" required="true">
<f:validateLength minimum="5" maximum="20" for="userName"/>
<p:ajax update="msgUserName" event="blur"/>
</p:inputText>
<p:message for="userName" id="msgUserName"/>
<h:outputLabel for="password" value="*#{msg['password']}:" />
<p:password id="password" value="#{userManagedBean.password}" required="true">
<f:validator validatorId="confirmPasswordValidator" />
<f:attribute name="confirm" value="#{confirmPassword.submittedValue}" />
<f:ajax event="blur" execute="password confirm" render="m_password" />
</p:password>
<p:message id="m_password" for="password" />
<h:outputLabel for="confirm" value="*#{msg['retypePassword']}:" />
<p:password id="confirm" binding="#{confirmPassword}" required="true">
<f:ajax event="blur" execute="password confirm" render="m_password m_confirm" />
</p:password>
<p:message id="m_confirm" for="confirm" />
<h:outputLabel for="email" value="#{msg['email']}:"/>
<p:inputText id="email" value="#{userManagedBean.email}" label="email">
<f:validateRegex pattern="^([a-zA-Z0-9_\-\.]+)#((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$" for="email"/>
<p:ajax update="msgEmail" event="blur"/>
</p:inputText>
<p:message for="email" id="msgEmail"/>
</h:panelGrid>
<ui:remove><p:captcha label="Captcha"/> </ui:remove>
<h:commandButton type="submit" value="#{msg['register']}" action="#{userManagedBean.register}"></h:commandButton>
</h:form>
</p:panel>
</ui:define>
</ui:composition>
</html>

Resources