[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-3208) validateAll ignores @NotNull and @NotEmpty

Hajo Krabbenhöft (JIRA) jira-events at lists.jboss.org
Sat Sep 27 08:14:20 EDT 2008


    [ https://jira.jboss.org/jira/browse/JBSEAM-3208?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12431469#action_12431469 ] 

Hajo Krabbenhöft commented on JBSEAM-3208:
------------------------------------------

apparently my fix can cause errors like this:
Caused by javax.el.PropertyNotFoundException with message: ...: Target Unreachable, 'addressAdditions' returned null on 'User'"

to circumvent that, add a try catch around the isRequired function in src/main/org/jboss/seam/core/Validators.java 
return false, if you catch a PropertyNotFoundException 

> validateAll ignores @NotNull and @NotEmpty
> ------------------------------------------
>
>                 Key: JBSEAM-3208
>                 URL: https://jira.jboss.org/jira/browse/JBSEAM-3208
>             Project: Seam
>          Issue Type: Bug
>          Components: JSF Integration
>    Affects Versions: 2.0.2.SP1
>         Environment: jboss-4.2.2.GA
> win xp pro
>            Reporter: Hajo Krabbenhöft
>         Attachments: diff.txt
>
>          Time Spent: 1 day
>  Remaining Estimate: 1 hour
>
> when i use s:valiadateAll and put a text field inside where the matching hibernate field has @NotEmpty set, no validation error will be raised if i submit without entering text.
> this is because JSF ignores the validators because the field is empty and not marked as required.
> therefore the ValidateAllRenderer will need to check for these validators and call evt.setRequired(true) as needed.

-- 
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

       




More information about the seam-issues mailing list