rich:popupPanel with <a4j:status> is not working in JSF2 - jsf-2

When i hit on Submit button rich popup panel is not working.Should it be outside the h:form or inside . I tried both ways but it is not working. Please help me where i am going wrong .Below is my code.
<!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:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:fn="http://java.sun.com/jsp/jstl/functions"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
<h:body>
<ui:composition template="/pages/layout.xhtml">
<ui:define name="heading">
<h:outputText value="Paging” </h:outputText>
</ui:define>
<ui:define name="content">
<h:panelGrid id="panel2">
<h:form id="my_form">
<table>
<tr>
<td>
<h:panelGroup id="globalmessages">
<h:message id="key1" for="key" style="color:red" showDetail="true" />
<h:message id="lock1" for="lock" errorStyle ="color:red" showDetail="true" />
</h:panelGroup>
</td>
</tr>
</table>
<table width="700px" >
<tr>
<td align="right" width="30%"><label>Files: </label></td>
<td align="left" width="70%"><h:outputText value= "Hosting file" /></td>
</tr>
<tr>
<td align="right" width="30%"><label for="lastdate">
Last Date:</label></td>
<td align="left" width="70%"><h:panelGrid id="panel1">
<h:panelGroup>
<rich:calendar id=" lastdate "
value="#{myBean.ladate}"
locale="Locale.US" popup="true" datePattern="MM/dd/yyyy"
showApplyButton="false" todayControlMode = "hidden" cellWidth="24px" cellHeight="220px"
enableManualInput = "true" converterMessage = "Entered wrong date format"
style="width:200px" required="true" requiredMessage="Last date: is required."/>
(MM/DD/YYYY)
</h:panelGroup>
</h:panelGrid>
<h:commandButton value ="getHost" action="#{mybean.hosted}" id="key" />
</td>
</tr>
<tr></tr><tr></tr><tr></tr><tr></tr>
<tr>
<td align="right" width="30%"><label>Data: </label></td>
<td align="left" width="70%"><h:inputText id="datarelated" value="#{myBean.dataExist}" style="padding-bottom: 68px; width: 165px;"/></td>
</tr>
<tr></tr><tr></tr><tr></tr>
<tr>
<td align="right">
<a4j:commandButton value ="SubmitVal" action="#{myBean.onVal}" id="lock" style="height: 25px; width: 90px;"
render="globalmessages" status="ajaxStatus"/>
</td>
</tr>
</table>
</h:form>
<a4j:status name="ajaxStatus"
onstart="#{rich:component('waitPanel')}.show('',{top:'340px', left:'450px',height:'50px', width:'350px'})"
onstop="#{rich:component('waitPanel')}.hide()" >
</a4j:status>
<rich:popupPanel id="waitPanel" style="text-align:center">
<h:form id="test">
<h:outputText value="Please wait...Calculating" style="font-weight:bold;font-size:large" />
</h:form>
</rich:popupPanel>
</h:panelGrid>
</ui:define>
</ui:composition>
</h:body>
</html>

Related

tabindex doesn't work on p:selectOneMenu or h:SelectOneMenu

Tabindex attribute is not working on p:selectOneMenu that I am using in my page. I also have h:inputtext on the same page for which tabindex works fine.
I am using primefaces 4.0. Please help. After the 2nd tabindex it gets lost.
<!-- This Dialog page is being used for both ADD & EDIT APPLICANT functionality -->
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.org/ui"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:ui="http://java.sun.com/jsf/facelets">
<h:form id="addApplicantForm">
<div class="panel" style="width: 540px;">
<p:outputPanel id="critTabPanel" >
<div class="dlgHeader">#{applicantForITCController.action} Applicant</div>
<table width="100%" border="0" cellspacing="5px" style="font-size: 12px">
<tr>
<td style="width:30%">First Name:</td>
<td style="width:65%;padding-right: 5px" align="right">
<h:inputText id="firstName-input" styleClass="suburbinput round5 applyInput" value="#{applicantForITCController.applicantForITCInfo.firstName}"
required="true" requiredMessage="First Name required" onkeypress="return fnb.pl.events.KeyEvents.isStringKey(event)" maxlength="50" tabindex="1"/>
<p:watermark for="firstName-input" value="Enter First Name" />
</td>
<td style="width:5%">
<p:message for="firstName-input" id="msg-firstName-input" display="icon" />
</td>
</tr>
<tr>
<td style="width:30%">Last Name:</td>
<td style="width:65%;padding-right: 5px" align="right">
<h:inputText id="lastName-input" styleClass="suburbinput round5 applyInput" value="#{applicantForITCController.applicantForITCInfo.lastName}"
onkeypress="return fnb.pl.events.KeyEvents.isStringKey(event)" maxlength="50" required="true" requiredMessage="Last Name required" tabindex="2"/>
<p:watermark for="lastName-input" value="Enter Last Name" />
</td>
<td style="width:5%">
<p:message for="lastName-input" id="msg-lastName-input" display="icon" />
</td>
</tr>
<tr>
<td style="width:30%">Identity Type:</td>
<td style="width:65%;">
<div class="contGeneric">
<div class="colRight">
<div class="fnbDropMenu">
<p:selectOneMenu id="cri-idType" value="#{applicantForITCController.applicantForITCInfo.idType}"
required="true" requiredMessage="Please select an Identity Type" styleClass="selectOnDialog" tabindex="3">
<f:selectItem itemLabel="Please select" itemValue=" " noSelectionOption="true" />
<f:selectItems value="#{applicantForITCController.idTypes}" var="idTy" itemLabel="#{idTy.desc}" itemValue="#{idTy}"/>
<f:validator for="idTypeValidator"
binding="#{za.co.fnb.propertyleader.interfaces.ui.web.validator.IDTypeValidator}"/>
<f:attribute name="idNum" value="#{idNum}" />
</p:selectOneMenu>
</div>
</div>
</div>
</td>
<td style="width:5%">
<p:message for="cri-idType" id="msg-idType" display="icon" />
</td>
</tr>
<tr>
<td style="width:30%">ID/Passport No:</td>
<td style="width:65%;padding-right: 5px" align="right">
<h:inputText id="idNumber" binding="#{idNum}" styleClass="suburbinput round5 applyInput" value="#{applicantForITCController.applicantForITCInfo.idNumber}"
required="true" requiredMessage="ID/Passport Number required" maxlength="30" tabindex="4"/>
<p:watermark for="idNumber" value="Enter ID/Passport Number" />
</td>
<td style="width:5%">
<p:message for="idNumber" id="msg-idNumber" display="icon" />
</td>
</tr>
<tr>
<td style="width:30%">Cell Number:</td>
<td style="width:65%;padding-right: 5px" align="right">
<h:inputText id="cellNo" styleClass="suburbinput round5 applyInput" value="#{applicantForITCController.applicantForITCInfo.cellNo}"
required="true" requiredMessage="Cell Number required" onkeydown="return fnb.pl.events.KeyEvents.isNumericKey(event)" maxlength="10" tabindex="5"/>
<p:watermark for="cellNo" value="Enter Cell Number" />
</td>
<td style="width:5%">
<p:message for="cellNo" id="msg-cellNo" display="icon" />
</td>
</tr>
</table>
</p:outputPanel>
<div class="btnHolder dblExtraForgotPass" align="center" style="padding-top: 15px;">
<a id="colorboxCloseBtn2" class="btn InActive"
href="javascript:addApplicantDialog.hide();"><span>Cancel</span></a>
<p:commandLink process="#this #parent" update=":#{p:component('applicantForITCTbl')} :#{p:component('confirmAppPanel')}
:#{p:component('critTabPanel')} :#{p:component('msgPnl1')}"
action="#{applicantForITCController.updateApplicantForItcList}" styleClass="btn InActive"
oncomplete="fnb.pl.property.handleAddApplicantComplete(xhr, status, args)">
<span>Save</span>
</p:commandLink>
</div>
</div>
</h:form>
</ui:composition>

Unable to show faces message on xhtml page

I am unable to show faces messages using facesMessage
Bean code :
if(condition){
FacesContext fc=FacesContext.getCurrentInstance();
fc.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL,"Rounding Rule Saved","R Saved"));
}
View code :
<p:messages autoUpdate="true" showDetail="true" globalOnly="true" id="msgId"/>
But I am not getting messages, what am I doing wrong?
EDIT:
My project flow is :
User click on edit button on view page
Redirect to edit page
After submitting return to view page
Render message(which I am not getting)
View code (rouning_rule_master.xhtml) :
<!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://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui"
xmlns:c="http://java.sun.com/jsp/jstl/core"
>
<ui:composition template="/pages/webEx_Template.xhtml">
<ui:define name="content">
<h:head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Rounding Rule Master</title>
<link rel="stylesheet" type="text/css" href="../css/rounding_rule_master.css" />
</h:head>
<h:body>
<div class="wrapper">
<div class="page_wrapper">
<div class="page_heading border_bottom">Rounding Rule Master</div>
<div class="form_div">
<h:form id="roundingMasterFormId" >
<p:messages autoUpdate="true" showDetail="true" globalOnly="true" id="MESSAGEID"/>
<div class="form_detail">
<div class="float_right">
<h:commandButton id="creataeBtn" action="#{roundingBean.createRoundingRule}" value="Create Rounding Rule" class="createRelation" >
<p:ajax onstart="statusDialog.show();" onsuccess="statusDialog.hide();"/>
</h:commandButton>
</div>
<div class="clear"></div>
<div style="margin:10px 0;">
<table id="roundingMasterTableId" width="100%" cellspacing="1" cellpadding="0" border="0" class="role_detail_section">
<thead>
<tr>
<th>Rounding Rule Id</th>
<th>Rounding Rule Name</th>
<th>Rounding Mode</th>
<th>Rounding Constant</th>
<th class="action">Action</th>
</tr>
</thead>
<tbody>
<c:forEach items="#{roundingBean.roundingRuleList}" var="var" >
<tr>
<h:inputHidden value="#{var.roundingRuleId}" />
<td><h:outputText value="#{var.roundingRuleId}" /></td>
<td><h:outputText value="#{var.roundingRuleName}" /></td>
<td><h:outputText value="#{var.roundingMode.roundingModeName}" /></td>
<td><h:outputText value="#{var.roundingIncrement}" /></td>
<td>
<p:commandLink value="Edit" styleClass="edit_icon" action="#{roundingBean.editRoundingRule (var,true)}" immediate="true" process="#this" onstart="statusDialog.show();" onsuccess="statusDialog.hide();">
</p:commandLink>
<p:commandLink id="deleteId" styleClass="remove_icon" action="#{roundingBean.deleteRoundingRule(var.roundingRuleId)}" immediate="true" update="#form" process="#this" oncomplete="addCSS()" onstart="statusDialog.show();" onsuccess="statusDialog.hide();">
<p:confirm header="Confirmation" message="Are you sure want to delete rounding rule ?" icon="ui-icon-alert" />Delete
</p:commandLink>
</td>
</tr>
</c:forEach>
</tbody>
</table>
</div>
</div>
<p:confirmDialog styleClass="confirm" global="true" showEffect="fade" draggable="false" closable="false" resizable="false" width="400">
<p:commandButton value="Yes" type="button" styleClass="ui-confirmdialog-yes"/>
<p:commandButton value="No" type="button" styleClass="ui-confirmdialog-no"/>
</p:confirmDialog>
<p:dialog styleClass="confirm" modal="true" widgetVar="statusDialog" header="Loading..."
draggable="false" closable="false" resizable="false" width="100"
height="50">
<div align="center">
<p:graphicImage value="../images/loading.gif" width="50"
height="50" />
</div>
</p:dialog>
</h:form>
</div>
</div>
</div>
</h:body>
</ui:define>
</ui:composition>
</html>
I am not sure if it is your case. But if you redirect after generating the Messages, they are lost in the redirect process. You need to make sure there is no redirect in the faces config - or any other mean - in your page flow.

ViewScoped bean losing its state after clicking a commandLink

I'm using Icefaces 3.2 along with JSF 2.1.8. I have the below views included in the main xhtml page. It looks like myViewBean which is #ViewScoped is losing it's state after the link myLink is clicked. The actionListener has logic to get the myViewBean and set the required list of items. During the render response phase, the myViewBean seems to have empty empList. If the #ViewScoped is changed to #SessionScoped, it works in the expected way, but I have 10 other beans all of which need to be changed to SessionScoped. What makes the bean lose its state? Or is there any other way to make use of ViewScoped?
main.xhtml
<!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:f="http://java.sun.com/jsf/core"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ice="http://www.icesoft.com/icefaces/component"
xmlns:ui="http://java.sun.com/jsf/facelets" >
<f:view contentType="text/html">
<h:head>
</h:head>
<h:body id="bodyId" bgcolor="white">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<ice:panelGroup>
<ice:form id="mainForm" name="mainForm">
<table>
<tbody>
<tr>
<td>
<ui:include src="myTabs.xhtml"/>
</td>
</tr>
</tbody>
</table>
</ice:form>
</ice:panelGroup>
</td>
</tr>
</table>
</h:body>
</f:view>
</html>
myTabs.xhtml
<f:subview
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ice="http://www.icesoft.com/icefaces/component"
xmlns:ui="http://java.sun.com/jsf/facelets">
<div>
<table class="icePnlTbSet" id="myTabSet"
border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td>
<table cellpadding="0" cellspacing="0">
<tbody>
<tr>
<!-- My Tab 1 -->
<td class="icePnlTb" style="vertical-align: bottom;" title="tab1">
<table cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="LftTop"><img alt="" src="/images/spacer.gif "
width="4" height="1" /></td>
<td class="MidTop"><img alt="" src="/images/spacer.gif "
width="4" height="1" /></td>
<td class="RtTop"><img alt="" src="/images/spacer.gif "
width="4" height="1" /></td>
</tr>
<tr>
<td class="LftMid"><img alt="" src="/images/spacer.gif "
width="4" height="1" /></td>
<td class="MidMid">
<ice:commandLink id="myLink" value="MyTab 1" title=""
actionListener="#{mySessionBean.tabChanged}">
<f:param value="0" name="tab" />
</ice:commandLink>
</td>
<td class="RtMid"><img alt="" src="/images/spacer.gif "
width="4" height="1" /></td>
</tr>
<tr>
<td class="LftBtm"><img alt="" src="/images/spacer.gif "
width="4" height="1" /></td>
<td class="MidBtm"><img alt="" src="/images/spacer.gif "
width="4" height="1" /></td>
<td class="RtBtm"><img alt="" src="/images/spacer.gif "
width="4" height="1" /></td>
</tr>
</tbody>
</table>
</td>
<!-- Repeat for n tabs -->
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
<ui:include src="tabcontent1.xhtml" />
</f:subview>
tabcontent1.xhtml
<f:subview
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:ice="http://www.icesoft.com/icefaces/component"
xmlns:ui="http://java.sun.com/jsf/facelets">
<ice:panelGroup>
<ice:dataTable id="empTable" value="#{myViewBean.empList}"
var="emp">
...
</ice:dataTable>
</ice:panelGroup>
</f:subview>
A #ViewScoped bean will only hold data if you return null or void from action methods (which will navigate back to the same page), once you navigate away from the view the data is lost.
May be you can try #RequestScoped.

How to display contents in reverse order in <h:dataTable>

I am accepting data in Array and displaying it in the same screen using <h:dataTable>.
How can display contents in reverse order, i.e. show the latest entry in the first row?
Below is code can i display nonDox.non_List in reverse order
<h:body>
<h:panelGroup rendered="#{not empty dataBase}">
<h:form id="nonDoxScanForm">
<f:event listener="#{nonDox.validate_AccNo}" type="postValidate" />
<table border="0" class="InnerBox" width="55%">
<tr><th colspan="7" align="Center" class="clsTitle">Non Dox Add</th></tr>
<tr>
<td>Delivery Date</td>
<td >Consginee (F2) </td>
<td>Weight (F3)</td>
<td>SubBranch Code(F4)</td>
<td >Consignment No (F10)</td>
<td align="Center">(F12)</td>
</tr>
<tr>
<td> <p:calendar value="#{nonDox.delDate}" id="fDat" /> </td>
<td><h:inputText size="20" id="fcon" value="#{nonDox.consignee}" /> </td>
<td><h:inputText size="20" id="fweig" value="#{nonDox.weight}" >
</h:inputText> </td>
<td><h:inputText size="20" id="fsub" value="#{nonDox.subBranchCode}" >
<f:validateLength maximum="3"></f:validateLength>
</h:inputText> </td>`enter code here`
<td><h:inputText size="10" id="acno" value="#{nonDox.accNo}" onfocus="this.select()" >
</h:inputText>
</td>
<td> <h:commandButton value="Add" id="fAdd" action="#{nonDox.addAction}" onclick="return validate();" />
</td>
<td> <h:commandButton value="Save" action="#{nonDox.saveAction}" >
</h:commandButton>
</td>
</tr>
<tr>
<td colspan="7">
<h:message for="acno"/>
</td>
</tr>
</table>
<h:dataTable value="#{ nonDox.non_List}" var="o"
styleClass="order-table"
headerClass="order-table-header"
rowClasses="order-table-odd-row,order-table-even-row" width="55%"
>
<h:column>
<f:facet name="header">Del Date</f:facet>
#{o.cor_Date.substring(0, 10)}
</h:column>
<h:column>
<f:facet name="header">consignee</f:facet>
#{o.consignee}
</h:column>
<h:column>
<f:facet name="header">Weight</f:facet>
#{o.weight}
</h:column>
<h:column>
<f:facet name="header">Rate</f:facet>
#{o.rate}
</h:column>
<h:column>
<f:facet name="header">subBranchCode</f:facet>
#{o.subBranchCode}
</h:column>
<h:column>
<f:facet name="header" >POD No</f:facet>
#{o.accNo}
</h:column>
<h:column>
<f:facet name="header">Action</f:facet>
<h:commandLink value="Delete" action="#{nonDox.deleteAction(o)}" />
</h:column>
</h:dataTable>
</h:form>
<h:panelGroup >
<h:panelGroup rendered="#{empty dataBase}">
<h1>Session Expired</h1>
<h:link outcome="Login" target="CommonContent" >Login</h:link>
</h:panelGroup>
</h:body>
If you're using an List as in new ArrayList<Item>(), it's easy: use Collections#reverse():
private List<Item> data;
#PostConstruct
public void init() {
data = service.list();
Collections.reverse(data);
}
// ...
Just reference it in <h:dataTable value="#{bean.data}"> the usual way.
If you're using an array as in Item[], then you'd need to convert it to List first with help of Arrays#asList(), so that you can feed it to Collections#reverse():
private List<Item> data;
#PostConstruct
public void init() {
Item[] items = service.array();
data = Arrays.asList(items);
Collections.reverse(data);
}
// ...
Or just rewrite the service method in such way that you don't need to perform this conversion step in the backing bean.
Key is, you shouldn't expect to perform this job in the view. You should just prepare the model in such way that it's exactly as what the view expects. The <h:dataTable> itself doesn't provide any facilities like that.

A component which is hidden by another JSF/primefaces

hello,
I'am using JSF/primefaces 2.0
My problem is that I can't see the button "Add User" in the page,I think the problem is caused by the balise p:fileUpload because when I delete it I can see the button!!
<table border="1" align="center" cellpadding="0" cellspacing="0" width="1000" heighth="1800">
<tr>
<td>
<h:form>
<table border="0" align="center" cellpadding="0" cellspacing="0" width="600">
<tr> <td> <h:outputLabel style="font-size: 13px" value="Nom" /> </td><td><h:inputText value="#{AddPerson.nom}" /></td></tr>
<tr><td> <h:outputLabel value="Files"/></td><td><p:fileUpload fileUploadListener="#{AddPerson.fileUpload}" update="messages" sizeLimit="500000" allowTypes="/(\.|\/)(gif|jpe?g|png)$/"/> </td></tr>
<tr><td> <h:commandButton action="#{AddPerson.addUserDB}" value="Add User" /> </td></tr>
</table>
</h:form>
</td>
</tr>
</table>
The whole code:
<body>
<table border="1" style='width:auto;height:100px;' align="center" cellpadding="0" cellspacing="0" >
<tr><td>
<table border="1" style='width:auto;height:100px;' align="center" cellpadding="0" cellspacing="0" >
<tr >
<td><h:graphicImage width="100" url="/ONST.jpg"/> </td>
<td >
<h:graphicImage width="900" url="/banner_home.jpg" />
</td>
</tr>
</table>
<br></br><br></br><br></br>
<table border="1" align="center" style='width:auto;height:100px;' cellpadding="0" cellspacing="0" >
<tr>
<td>
<h:form>
<table border="1" style='width:auto;height:100px;' align="center" cellpadding="1" cellspacing="1" >
<tr> <td> <h:outputLabel style="font-size: 13px" value="Nom" /> </td><td><h:inputText value="#{AddPerson.nom}" /></td></tr>
<tr> <td> <h:outputLabel value="Prenom"/></td><td> <h:inputText value="#{AddPerson.prenom}" /></td></tr>
<tr> <td> <h:outputLabel value="Etat Civil"/></td>
<td> <h:selectOneMenu id="etatcivil" value="#{AddPerson.etatCivil}">
<f:selectItem itemValue="Monsieur" itemLabel="M"/>
<f:selectItem itemValue="Madam" itemLabel="Mme"/>
<f:selectItem itemValue="Madmoiselle" itemLabel="Mlle"/>
</h:selectOneMenu>
</td></tr>
<tr>
<td><h:outputLabel value="Date de naissance "/> </td>
<td>
<h:selectOneMenu id="jour" value="#{AddPerson.jour}">
<f:selectItem itemValue="00" itemLabel=""/>
<f:selectItem itemValue="01" itemLabel="01"/> <f:selectItem itemValue="02" itemLabel="02"/><f:selectItem itemValue="03" itemLabel="03"/>
<f:selectItem itemValue="04" itemLabel="04"/><f:selectItem itemValue="05" itemLabel="05"/><f:selectItem itemValue="06" itemLabel="06"/>
<f:selectItem itemValue="07" itemLabel="07"/><f:selectItem itemValue="08" itemLabel="08"/><f:selectItem itemValue="09" itemLabel="09"/>
<f:selectItem itemValue="10" itemLabel="10"/><f:selectItem itemValue="11" itemLabel="11"/><f:selectItem itemValue="12" itemLabel="12"/>
<f:selectItem itemValue="13" itemLabel="13"/><f:selectItem itemValue="14" itemLabel="14"/><f:selectItem itemValue="15" itemLabel="15"/>
<f:selectItem itemValue="16" itemLabel="16"/><f:selectItem itemValue="17" itemLabel="17"/><f:selectItem itemValue="18" itemLabel="18"/>
<f:selectItem itemValue="19" itemLabel="19"/><f:selectItem itemValue="20" itemLabel="20"/><f:selectItem itemValue="21" itemLabel="21"/>
<f:selectItem itemValue="22" itemLabel="22"/><f:selectItem itemValue="23" itemLabel="23"/><f:selectItem itemValue="24" itemLabel="24"/>
<f:selectItem itemValue="25" itemLabel="25"/><f:selectItem itemValue="26" itemLabel="26"/><f:selectItem itemValue="27" itemLabel="27"/>
<f:selectItem itemValue="28" itemLabel="28"/><f:selectItem itemValue="29" itemLabel="29"/><f:selectItem itemValue="30" itemLabel="30"/>
<f:selectItem itemValue="31" itemLabel="31"/>
</h:selectOneMenu>
<h:selectOneMenu id="mois" value="#{AddPerson.mois}">
<f:selectItem itemValue="00" itemLabel=""/>
<f:selectItem itemValue="01" itemLabel="Janvier"/> <f:selectItem itemValue="02" itemLabel="Fevrier"/><f:selectItem itemValue="03" itemLabel="Mars"/>
<f:selectItem itemValue="04" itemLabel="Avril"/><f:selectItem itemValue="05" itemLabel="May"/><f:selectItem itemValue="06" itemLabel="Juin"/>
<f:selectItem itemValue="07" itemLabel="Juillet"/><f:selectItem itemValue="08" itemLabel="Aout"/><f:selectItem itemValue="09" itemLabel="Septembre"/>
<f:selectItem itemValue="10" itemLabel="Octobre"/><f:selectItem itemValue="11" itemLabel="Novembre"/><f:selectItem itemValue="12" itemLabel="Decembre"/>
</h:selectOneMenu>
<h:selectOneMenu id="annee" value="#{AddPerson.annee}" >
<f:selectItem itemValue="1940" itemLabel="1940"/> <f:selectItem itemValue="1941" itemLabel="1941"/><f:selectItem itemValue="1942" itemLabel="1942"/><f:selectItem itemValue="1943" itemLabel="1943"/><f:selectItem itemValue="1944" itemLabel="1944"/><f:selectItem itemValue="1945" itemLabel="1945"/><f:selectItem itemValue="1946" itemLabel="1946"/><f:selectItem itemValue="1947" itemLabel="1947"/><f:selectItem itemValue="1948" itemLabel="1948"/><f:selectItem itemValue="1949" itemLabel="1949"/>
<f:selectItem itemValue="1950" itemLabel="1950"/><f:selectItem itemValue="1951" itemLabel="1951"/><f:selectItem itemValue="1952" itemLabel="1952"/><f:selectItem itemValue="1953" itemLabel="1953"/><f:selectItem itemValue="1954" itemLabel="1954"/><f:selectItem itemValue="1955" itemLabel="1955"/><f:selectItem itemValue="1956" itemLabel="1956"/><f:selectItem itemValue="1957" itemLabel="1957"/><f:selectItem itemValue="1958" itemLabel="1958"/><f:selectItem itemValue="1959" itemLabel="1959"/>
<f:selectItem itemValue="1960" itemLabel="1960"/><f:selectItem itemValue="1961" itemLabel="1961"/><f:selectItem itemValue="1962" itemLabel="1962"/><f:selectItem itemValue="1963" itemLabel="1963"/><f:selectItem itemValue="1964" itemLabel="1964"/><f:selectItem itemValue="1965" itemLabel="1965"/><f:selectItem itemValue="1966" itemLabel="1966"/><f:selectItem itemValue="1967" itemLabel="1967"/><f:selectItem itemValue="1968" itemLabel="1968"/><f:selectItem itemValue="1969" itemLabel="1969"/>
<f:selectItem itemValue="1970" itemLabel="1970"/><f:selectItem itemValue="1971" itemLabel="1971"/><f:selectItem itemValue="1972" itemLabel="1972"/><f:selectItem itemValue="1973" itemLabel="1973"/><f:selectItem itemValue="1974" itemLabel="1974"/><f:selectItem itemValue="1975" itemLabel="1975"/><f:selectItem itemValue="1976" itemLabel="1976"/><f:selectItem itemValue="1977" itemLabel="1977"/><f:selectItem itemValue="1978" itemLabel="1978"/><f:selectItem itemValue="1979" itemLabel="1979"/>
<f:selectItem itemValue="1980" itemLabel="1980"/><f:selectItem itemValue="1981" itemLabel="1981"/><f:selectItem itemValue="1982" itemLabel="1982"/><f:selectItem itemValue="1983" itemLabel="1983"/><f:selectItem itemValue="1984" itemLabel="1984"/><f:selectItem itemValue="1985" itemLabel="1985"/><f:selectItem itemValue="1986" itemLabel="1986"/><f:selectItem itemValue="1987" itemLabel="1987"/><f:selectItem itemValue="1988" itemLabel="1988"/><f:selectItem itemValue="1989" itemLabel="1989"/>
<f:selectItem itemValue="1990" itemLabel="1990"/><f:selectItem itemValue="1991" itemLabel="1991"/><f:selectItem itemValue="1992" itemLabel="1992"/><f:selectItem itemValue="1993" itemLabel="1993"/><f:selectItem itemValue="1994" itemLabel="1994"/><f:selectItem itemValue="1995" itemLabel="1995"/><f:selectItem itemValue="1996" itemLabel="1996"/><f:selectItem itemValue="1997" itemLabel="1997"/><f:selectItem itemValue="1998" itemLabel="1998"/><f:selectItem itemValue="1999" itemLabel="1999"/>
<f:selectItem itemValue="2000" itemLabel="2000"/><f:selectItem itemValue="2001" itemLabel="2001"/><f:selectItem itemValue="2002" itemLabel="2002"/><f:selectItem itemValue="2003" itemLabel="2003"/><f:selectItem itemValue="2004" itemLabel="2004"/><f:selectItem itemValue="2005" itemLabel="2005"/><f:selectItem itemValue="2006" itemLabel="2006"/><f:selectItem itemValue="2007" itemLabel="2007"/><f:selectItem itemValue="2008" itemLabel="2008"/><f:selectItem itemValue="2009" itemLabel="2009"/>
<f:selectItem itemValue="2010" itemLabel="2010"/><f:selectItem itemValue="2011" itemLabel="2011"/><f:selectItem itemValue="2012" itemLabel="2012"/>
</h:selectOneMenu>
</td>
</tr>
<tr><td><h:outputLabel value="email"/></td><td><h:inputText value="#{AddPerson.email}" /></td></tr>
<tr><td> <h:outputLabel value="numTelephone"/></td><td><h:inputText value="#{AddPerson.numTelephone}" /></td></tr>
<tr> <td> <h:outputLabel value="mobile"/></td><td><h:inputText value="#{AddPerson.mobile}" /></td></tr>
<tr><td> <h:outputLabel value="fax"/></td><td><h:inputText value="#{AddPerson.fax}" /></td></tr>
<tr><td> <h:outputLabel value="profession"/></td><td><h:inputText value="#{AddPerson.profession}" /></td></tr>
<tr><td> <h:outputLabel value="adresse"/></td><td><h:inputText value="#{AddPerson.adresse}" /></td></tr>
<tr><td> <h:outputLabel value="code Postal"/></td><td><h:inputText value="#{AddPerson.codePostal}" /></td></tr>
<tr><td> <h:outputLabel value="Ville"/></td><td><h:inputText value="#{AddPerson.ville}" /></td></tr>
<tr><td> <h:outputLabel value="Pays"/></td><td><h:inputText value="#{AddPerson.pays}" /></td></tr>
<tr><td> <h:outputLabel value="Domaine de Competence"/></td>
<td> <h:selectOneMenu value="#{AddPerson.domain}" id="domaine" >
<f:selectItem itemLabel="-- Select Domaine de Competence-- " itemValue="0"/>
<f:selectItems value="#{AddPerson.listDomaine}" />
</h:selectOneMenu></td></tr>
<tr><td><h:outputLabel value="login"/></td><td><h:inputText value="#{AddPerson.login}" /></td></tr>
<tr><td> <h:outputLabel value="password"/></td><td><h:inputText value="#{AddPerson.password}" /></td></tr>
<tr><td> <h:outputLabel value="Files"/></td> <td> <h:panelGroup style="display:inline-block"> <p:fileUpload fileUploadListener="#{AddPerson.fileUpload}" update="messages" sizeLimit="500000" allowTypes="/(\.|\/)(gif|jpe?g|png)$/" /></h:panelGroup></td></tr>
<tr><td> </td><td> <h:commandButton type="submit" value="Add User" action="#{AddPerson.addUserDB}" /> </td></tr>
</table>
</h:form>
</td>
</tr>
</table>
</td></tr></table>
</body>
Sorry, but I cannot reproduce your problem.
This is how your given code looks in FF 11 (and similar in IE9 and Chrome 18):
Maybe you have a stylesheet included somewhere else on your page that hides the button somehow..

Resources