[
https://jira.jboss.org/jira/browse/JBSEAM-4172?page=com.atlassian.jira.pl...
]
Yuriy Lazarev updated JBSEAM-4172:
----------------------------------
Issue Type: Bug (was: Feature Request)
Fix Version/s: (was: 2.1.0.GA)
Affects Version/s: 2.1.2.CR1
Description:
Suppose such form elements:
<s:decorate template="/template/form_item.xhtml">
<ui:define name="label">
<h:outputText value="#{messages.old_password}" />
</ui:define>
<h:inputSecret id="old_password"
value="#{updateProfileAction.password}" />
</s:decorate>
<s:decorate template="/template/form_item.xhtml">
<ui:define name="label">
<h:outputText value="#{messages.new_password}" />
</ui:define>
<h:inputSecret id="new_password"
value="#{updateProfileAction.passwordNew}">
<s:validateEquality for="old_password"
messageId="new_password_is_equal_to_old" operator="not_equal" />
</h:inputSecret>
</s:decorate>
<s:decorate template="/template/form_item.xhtml">
<ui:define name="label">
<h:outputText value="#{messages.repeat_new_password}" />
</ui:define>
<h:inputSecret value="#{updateProfileAction.passwordNewRepeat}">
<s:validateEquality for="new_password"
messageId="new_passwords_dont_match" />
<ui:remove>
This component is implicitly required
(org.jboss.seam.ui.renderkit.EqualityValidationRendererBase:46 = evh.setRequired(true);)
It makes impossible to achieve such behavior:
1) If both password fields are blank then its ok - user doesn't want to change
his old password.
2) If there is any text in one of the fields - check if values are equal and
update password only if they are.
</ui:remove>
</h:inputSecret>
</s:decorate>
At the moment validation fails for empty fields as they are required.
was:
Extension of h:inputSecret.
Renders two input fields. Attaches a validator by default that checks both fields are the
same. Use like
<s:inputPassword value="#{identity.password}" />
Advantages: No backing bean logic required, validation done at correct point
Complexity: Medium
Description changed
s:validateEquality doesn't work with empty values
-------------------------------------------------
Key: JBSEAM-4172
URL:
https://jira.jboss.org/jira/browse/JBSEAM-4172
Project: Seam
Issue Type: Bug
Components: JSF Controls
Affects Versions: 2.1.2.CR1
Reporter: Yuriy Lazarev
Assignee: Daniel Roth
Suppose such form elements:
<s:decorate template="/template/form_item.xhtml">
<ui:define name="label">
<h:outputText value="#{messages.old_password}" />
</ui:define>
<h:inputSecret id="old_password"
value="#{updateProfileAction.password}" />
</s:decorate>
<s:decorate template="/template/form_item.xhtml">
<ui:define name="label">
<h:outputText value="#{messages.new_password}" />
</ui:define>
<h:inputSecret id="new_password"
value="#{updateProfileAction.passwordNew}">
<s:validateEquality for="old_password"
messageId="new_password_is_equal_to_old" operator="not_equal" />
</h:inputSecret>
</s:decorate>
<s:decorate template="/template/form_item.xhtml">
<ui:define name="label">
<h:outputText value="#{messages.repeat_new_password}" />
</ui:define>
<h:inputSecret value="#{updateProfileAction.passwordNewRepeat}">
<s:validateEquality for="new_password"
messageId="new_passwords_dont_match" />
<ui:remove>
This component is implicitly required
(org.jboss.seam.ui.renderkit.EqualityValidationRendererBase:46 = evh.setRequired(true);)
It makes impossible to achieve such behavior:
1) If both password fields are blank then its ok - user doesn't want to
change his old password.
2) If there is any text in one of the fields - check if values are equal and
update password only if they are.
</ui:remove>
</h:inputSecret>
</s:decorate>
At the moment validation fails for empty fields as they are required.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira