You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Wim Vandenhaute (JIRA)" <de...@myfaces.apache.org> on 2008/05/07 17:08:55 UTC

[jira] Commented: (TOMAHAWK-1232) EqualValidator: 'for' attribute doesn't work correctly in conjunction with RichFaces

    [ https://issues.apache.org/jira/browse/TOMAHAWK-1232?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12594938#action_12594938 ] 

Wim Vandenhaute commented on TOMAHAWK-1232:
-------------------------------------------

Experiencing the same issue when I migrated from Seam 1.2 to Seam 2.1

> EqualValidator: 'for' attribute doesn't work correctly in conjunction with RichFaces
> ------------------------------------------------------------------------------------
>
>                 Key: TOMAHAWK-1232
>                 URL: https://issues.apache.org/jira/browse/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
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> (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: http://jira.jboss.com/jira/browse/RF-1499
> code:
> <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 #{authCtx.currentUser.id}"/>
> 					</f:facet>
> 					<t:panelGrid columns="2">
> 						<t:outputLabel value="Please type the current user (#{authCtx.currentUser.id}) password" for="currentUserPassword"/>
> 						<t:inputSecret id="currentUserPassword" value="#{userAdministrationFormBean.actingUserPassword}" required="true" redisplay="false" tabindex="1">
> 							<!--a4j:support event="onkeyup" ajaxSingle="true" immediate="true" reRender="changePasswordButtonDiv"/--> 
> 						</t:inputSecret>								
> 					</t:panelGrid>
> 				</rich:panel>
> 				<rich:spacer height="50"/>								
> 				<rich:panel id="passwordChangePanel">
> 					<f:facet name="header">
> 						<h:outputText value="Change password for #{userAdministrationFormBean.selectedUserId}"/>
> 					</f:facet>				
> 					<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" />
> 						<rich:spacer/>
> 						
> 						<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:inputSecret>
> 						<t:inputHidden value="#{userAdministrationFormBean.selectedUserId}" />				
> 						
> 						<rich:spacer/>
> 						<rich:spacer/>
> 						<rich:spacer/>
> 						
> 						<rich:spacer/>
> 						<t:div id="changePasswordButtonDiv">
> 							<a4j:commandButton value="Change password" id="changePasswordButton" action="#" actionListener="#{userAdministrationFormBean.changePassword}"   
> 										 reRender="changePasswordInclude">
> 										 </a4j:commandButton> 									
> 						</t:div>																			
> 		
> 						<a4j:commandButton value="Cancel" action="#" onclick="Richfaces.hideModalPanel('changePasswordModalPanel')" action="#{userAdministrationFormBean.resetPasswordDialog}" 
> 										immediate="true"/>
> 																		
> 					</t:panelGrid>
> 				</rich:panel>	
> 				<a4j:outputPanel id="chgPswMsgsPanel">
> 					<t:messages showDetail="true" showSummary="true" layout="table"/>
> 				</a4j:outputPanel>						
> 			</t:div>
> 		</h:form>		
> 	</rich:modalPanel>
> </a4j:region>
> 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.