[
https://jira.jboss.org/jira/browse/SEAMFACES-17?page=com.atlassian.jira.p...
]
Lincoln Baxter III updated SEAMFACES-17:
----------------------------------------
Affects: [Documentation (Ref Guide, User Guide, etc.), Release Notes]
Support Cross-field form validation
-----------------------------------
Key: SEAMFACES-17
URL:
https://jira.jboss.org/jira/browse/SEAMFACES-17
Project: Seam Faces
Issue Type: Feature Request
Components: UI Components
Affects Versions: 3.0.0.Alpha1
Reporter: Lincoln Baxter III
Assignee: Lincoln Baxter III
Fix For: 3.0.0.Alpha3
<h:form id="form">
<h:inputText id="cityId" value="#{submitBean.author}"
/>
<h:inputText id="state" value="#{submitBean.title}"
/>
<h:inputText id="zip" value="#{submitBean.text}" />
<h:commandButton id="submit" value="Submit"
action="#{submitBean.submitPost}" />
<s:validateForm fields="city=cityId state zip"
validatorId="postValidator" />
</h:form>
@FacesValidator("postValidator")
public class PostValidator extends FormValidator
{
@Field
private String city;
@Field
private String state;
@Field
private String zip;
@Override
public void validate()
{
throw new ValidatorException(new FacesMessage("Multiple fields-- failed
validation!"));
}
}
Should add a global Validation Failure message, and set all affected fields to invalid
state, failing validation.
--
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