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

Pete Muir (JIRA) jira-events at lists.jboss.org
Mon Jun 23 07:59:28 EDT 2008


     [ http://jira.jboss.com/jira/browse/JBSEAM-3118?page=all ]

Pete Muir updated JBSEAM-3118:
------------------------------

    Fix Version/s: 2.0.3.GA
                   2.1.0.BETA1

> 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
>            Priority: Minor
>             Fix For: 2.0.3.GA, 2.1.0.BETA1
>
>
> 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