You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by sushma sharma <su...@rediffmail.com> on 2007/07/25 21:04:25 UTC

Validators not being called.

Hi,

I have got this problem. My custom validator is not being called in only one of my JSPs. I have not set immediate to true and I tried to use a phase listener to check if it goes through PROCESS_VALIDATIONS phase and it does. But it would not call any validatiors.
My field is not required, but I tried to test if validation is done at all, so I made this field required.But, it is not checking for required validation also. I entered nothing in the field and it took it and updated the model values.
Does any one have any idea why is this happening? Any suggestions are appreciated.
below is phase listener output and JSP page.

PhaseListner Output============================================================

-BEFORE RESTORE_VIEW(1)---
***AFTER PHASE RESTORE_VIEW(1)*****
-BEFORE APPLY_REQUEST_VALUES(2)-----
***AFTER PHASE APPLY_REQUEST_VALUES(2)*****
-BEFORE PROCESS_VALIDATIONS(3)-----
***AFTER PHASE PROCESS_VALIDATIONS(3)*****
-BEFORE UPDATE_MODEL_VALUES(4)-----
***AFTER PHASE UPDATE_MODEL_VALUES(4)*****
-BEFORE INVOKE_APPLICATION(5)-----

 ENTER editApproversToSteps

Key = wfEditView:wfEditForm:wfList:0:approverTable:1:site Value =

Key = wfEditView:wfEditForm:wfList:0:approverTable:0:site Value = HPW

 exit editApproversToSteps
 
***AFTER PHASE INVOKE_APPLICATION(5)*****
-BEFORE RENDER_RESPONSE(6)-----
***AFTER PHASE RENDER_RESPONSE(6)*****
-BEFORE RESTORE_VIEW(1)-----
***AFTER PHASE RESTORE_VIEW(1)*****
-BEFORE APPLY_REQUEST_VALUES(2)-----


JSP=================================================================================

	<t:dataList var="wfitem" value="#{wfBean.editStepsList}" id="wfList" layout="simple" rowIndexVar="wfcount">
		<h:panelGroup rendered="#{! empty wfitem.approvers}">
			<h:outputText value="#{bundle.approvers}" styleClass="cellHeader" style="vertical-align:top;" rendered="#{! empty item.approvers}"/>
			<t:div styleClass="singleWrap">						
				<t:dataTable var="item" value="#{wfitem.approvers}" id="approverTable" border="0" 
				cellpadding="5px" cellspacing="5px" forceId="true"
					width="100%" rowIndexVar="count" >
					<h:column>
						<f:facet name="header">
							<h:outputText value="Site"/>
						</f:facet>
						<t:inputText id="site" value="#{item.site}" size="3" maxlength="3" 
						required="true">
							<f:validator validatorId="SiteValidator"/>
						</t:inputText>
						<h:message for="site" styleClass="errorClass"/>
					</h:column>
				</t:dataTable>
		 	</t:div>
		</h:panelGroup>
	</t:dataList>
 	<h:commandButton action="#{wfBean.editApproversToSteps}" value="#{bundle.save}" 
 	 id="editApproverBtn"/>

========================================================================
Thanks in advance,
Sushma