myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Baroch Oren (JIRA)" <>
Subject [jira] Created: (TOMAHAWK-1232) EqualValidator: 'for' attribute doesn't work correctly in conjunction with RichFaces
Date Tue, 15 Apr 2008 13:17:05 GMT
EqualValidator: 'for' attribute doesn't work correctly in conjunction with RichFaces

                 Key: TOMAHAWK-1232
             Project: MyFaces Tomahawk
          Issue Type: Bug
          Components: Validators
    Affects Versions: 1.1.6
         Environment: MyFaces Core 1.2.2 - Tomahawk 1.1.6 - RichFaces 3.2.0-GA - Spring 2.0.5
on Jetty 6.1.3
            Reporter: Baroch Oren

(Put as Major - since might apply also to other places where interface with RichFaces might
cause similar issue)

In the following code, generated Id for <t:inputSecret> is postfixed with j_id_2, which
prevents <t:EqualValidator> from working properly. 
This issue is similar to an RichFaces-internal bug, already fixed:

<a4j:region id="changePasswordModalDialogCompositionRegion">
	<rich:modalPanel id="changePasswordModalPanel" autosized="true" zindex="2000" width="600"
height="400" showWhenRendered="true">
		<h:form id="changePasswordModalPanelForm">
			<t:div id="changePasswordModalDiv">
				<rich:panel id="identityVerificationPanel">
					<f:facet name="header">
						<h:outputText value="Identity verification for user #{}"/>
					<t:panelGrid columns="2">
						<t:outputLabel value="Please type the current user (#{}) password"
						<t:inputSecret id="currentUserPassword" value="#{userAdministrationFormBean.actingUserPassword}"
required="true" redisplay="false" tabindex="1">
							<!--a4j:support event="onkeyup" ajaxSingle="true" immediate="true" reRender="changePasswordButtonDiv"/-->

				<rich:spacer height="50"/>								
				<rich:panel id="passwordChangePanel">
					<f:facet name="header">
						<h:outputText value="Change password for #{userAdministrationFormBean.selectedUserId}"/>
					<t:panelGrid columns="3">
						<t:outputLabel value="Type a new password:" for="passwordInput"/>
						<t:inputSecret id="passwordInput" value="#{userAdministrationFormBean.selectedUserNewPassword}"
required="true" redisplay="false" forceId="true" />
						<t:outputLabel value="Re-type password:" for="repeatPassswordInput"/>
						<t:inputSecret id="repeatPassswordInput" required="true" value="" redisplay="false">
							<t:validateEqual for="passwordInput" message="Password not changed: Password fields
do not match"/>						
						<t:inputHidden value="#{userAdministrationFormBean.selectedUserId}" />				
						<t:div id="changePasswordButtonDiv">
							<a4j:commandButton value="Change password" id="changePasswordButton" action="#"
						<a4j:commandButton value="Cancel" action="#" onclick="Richfaces.hideModalPanel('changePasswordModalPanel')"
				<a4j:outputPanel id="chgPswMsgsPanel">
					<t:messages showDetail="true" showSummary="true" layout="table"/>

Note: workaround - use forceId to disable postfixing - does not work. in this case, the error
would be: 
javax.faces.FacesException - Unable to find component 'passwordInput' (calling findComponent
on component repeatPassswordInputj_id_2')
The Richfaces postfixing still applies; Firebug shows: <input id="passwordInputj_id_2"
type="password" name="passwordInputj_id_2"/>

BTW postfixing, as far as I understood, originates from the JSF spec, and thus should not
be disabled.

Currently this issue forces me to re-write the EqualValidator component. 

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message