Validation with expression doesn't work on nested bean properties
-----------------------------------------------------------------

                 Key: STS-373
                 URL: http://mc4j.org/jira/browse/STS-373
             Project: Stripes
          Issue Type: Bug
          Components: Validation
    Affects Versions: Release 1.4.3
         Environment: jetty 6.1.2rc5, Java 1.5
            Reporter: Tobias K.
         Assigned To: Tim Fennell
            Priority: Minor



the source:

// user has property email
private User user;

/**
 * @return the emailConfirmation
 */
@Validate(required = true, minlength = 4, maxlength = 50, expression = "this == 
user.email")
public String getEmailConfirmation() {
        return emailConfirmation;
}

Error:
ERROR - Log.error(144) | Error evaluating expression for property 
emailConfirmation of class CreateAccountActionBean. Expression: this == 
user.email

If I replace user.email with a local bean property "email", that returns 
user.getEmail() it works:

/**
 * @return the emailConfirmation
 */
@Validate(required = true, minlength = 4, maxlength = 50, expression = "this == 
email")
public String getEmailConfirmation() {
        return emailConfirmation;
}
public String getEmail() {
        return user.getEmail();
}

Would be nice, to fix this issue :) Expression syntax safes a lot of time...


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

        

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Stripes-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-development

Reply via email to