[jbossseam-issues] [JBoss JIRA] Created: (JBSEAM-3118) Unclear ItemValidator example in reference (31.2)

Richard Richter (JIRA) jira-events at lists.jboss.org
Sun Jun 15 14:06:33 EDT 2008


Unclear ItemValidator example in reference (31.2)
-------------------------------------------------

                 Key: JBSEAM-3118
                 URL: http://jira.jboss.com/jira/browse/JBSEAM-3118
             Project: Seam
          Issue Type: Bug
          Components: Documentation Issues
    Affects Versions: 2.1.0.A1
            Reporter: Richard Richter


In section 31.2 of Seam reference (2.1 version) there is an example which is not very clear:

@Name("itemValidator")
@BypassInterceptors
@Validator
public class ItemValidator implements Validator {
public void validate(FacesContext context, UIComponent cmp, Object value)
throws ValidatorException {
ItemController ItemController = (ItemController) Component.getInstance("itemController");
return itemController.validate(value);
}
}

First thing is that if you accept one import for Validator, the other usage of that type is broken - there are both Hibernate Validator annotation and JSF Validator interface used (I'd use FQN for this one probably). Other thing is that there is return of something for void method. Example is rather confusing as it is now.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list