jsr3003 with groups

12 views
Skip to first unread message

Robert W

unread,
Mar 4, 2012, 2:28:25 AM3/4/12
to gran...@googlegroups.com
I try use groups concept in entities validation. Graniteds plugin generates as interface for java pair
public interface AAA {
    }
If I try validate bean using groups I get an exception
ValidatorFactory.getInstance().validate(entity,[AAA])
org.granite.validation::ConstraintDefinitionError: org.granite.validation.constraints::NotNull: Class not found: [fully qualified interface name]
at at org.granite.validation.helper::ConstraintHelper$/convert()[...\framework\org\granite\validation\helper\ConstraintHelper.as:123]
I reading http://www.graniteds.org/confluence/display/DOC/8.+Bean+Validation+%28JSR-303%29 and seams that I used documented pattern.

wdrai

unread,
Mar 5, 2012, 10:47:29 AM3/5/12
to gran...@googlegroups.com
There seems to be an error in your bean constraints. Can you post the AS3 object ?

Robert W

unread,
Mar 5, 2012, 4:39:14 PM3/5/12
to gran...@googlegroups.com
My bean have annotated field
@Size(min=5,message="Surname should have {min} chars",groups=IClientExtendedForm.class)
    @NotNull(groups=IClientExtendedForm.class)
    private String password;

granite plugin generates
 [Size(groups="ClientExtendedForm", min="5", max="2147483647", message="Surname should have {min} chars")]
        [NotNull(groups="IClientExtendedForm", message="{javax.validation.constraints.NotNull.message}")]
        public function get password():String {
            return _password;
        }
plus interface
package {

    public interface IClientExtendedForm {
Reply all
Reply to author
Forward
0 new messages