Examples of applyIf()


Examples of org.springmodules.validation.bean.conf.loader.annotation.handler.Email.applyIf()

    @Override
    public String convertToValang(String fieldName, Annotation a, MessageSourceAccessor messages) {
        Email annotation = (Email) a;

        String errMsg = messages.getMessage(annotation.errorCode(), annotation.message());
        String applyIfValang = valangToJS(annotation.applyIf());

        StringBuffer sb = new StringBuffer();
        sb.append(" function() {return this.equals((this.EmailFunction(this.getPropertyValue(");
        sb.append(wrapAndEscapeJsString(fieldName)); // name
        sb.append("))), (true))}");
View Full Code Here

Examples of org.springmodules.validation.bean.conf.loader.annotation.handler.Expression.applyIf()

    @Override
    public String convertToValang(String fieldName, Annotation a, MessageSourceAccessor messages) {
        Expression annotation = (Expression) a;

        String errMsg = messages.getMessage(annotation.errorCode(), annotation.message());
        String applyIfValang = valangToJS(annotation.applyIf());
        String expression = valangToJS(annotation.value());

        return buildBasicRule(fieldName, errMsg, expression, applyIfValang, annotation);
    }
View Full Code Here

Examples of org.springmodules.validation.bean.conf.loader.annotation.handler.InTheFuture.applyIf()

            applyIfValang = valangToJS(annotation.applyIf());
        } else if (a instanceof InTheFuture) {
            InTheFuture annotation = (InTheFuture) a;
            errMsg = messages.getMessage(annotation.errorCode(), annotation.message());
            pastFutureMethod = "moreThan";
            applyIfValang = valangToJS(annotation.applyIf());
        }

        StringBuffer sb = new StringBuffer();
        sb.append(" function() {return this.");
        sb.append(pastFutureMethod);
View Full Code Here

Examples of org.springmodules.validation.bean.conf.loader.annotation.handler.InThePast.applyIf()

        if (a instanceof InThePast) {
            InThePast annotation = (InThePast) a;
            errMsg = messages.getMessage(annotation.errorCode(), annotation.message());
            pastFutureMethod = "lessThan";
            applyIfValang = valangToJS(annotation.applyIf());
        } else if (a instanceof InTheFuture) {
            InTheFuture annotation = (InTheFuture) a;
            errMsg = messages.getMessage(annotation.errorCode(), annotation.message());
            pastFutureMethod = "moreThan";
            applyIfValang = valangToJS(annotation.applyIf());
View Full Code Here

Examples of org.springmodules.validation.bean.conf.loader.annotation.handler.InThePast.applyIf()

            applyIfValang = valangToJS(annotation.applyIf());
        } else if (a instanceof InTheFuture) {
            InTheFuture annotation = (InTheFuture) a;
            errMsg = messages.getMessage(annotation.errorCode(), annotation.message());
            pastFutureMethod = "moreThan";
            applyIfValang = valangToJS(annotation.applyIf());
        }

        StringBuffer sb = new StringBuffer();
        sb.append(" function() {return this.");
        sb.append(pastFutureMethod);
View Full Code Here

Examples of org.springmodules.validation.bean.conf.loader.annotation.handler.Length.applyIf()

        if (a instanceof Length) {
            Length annotation = (Length) a;
            errMsg = messages.getMessage(annotation.errorCode(), annotation.message());
            min = annotation.min();
            max = annotation.max();
            applyIfValang = valangToJS(annotation.applyIf());
        } else if (a instanceof Size) {
            Size annotation = (Size) a;
            errMsg = messages.getMessage(annotation.errorCode(), annotation.message());
            min = annotation.min();
            max = annotation.max();
View Full Code Here

Examples of org.springmodules.validation.bean.conf.loader.annotation.handler.Length.applyIf()

        } else if (a instanceof Size) {
            Size annotation = (Size) a;
            errMsg = messages.getMessage(annotation.errorCode(), annotation.message());
            min = annotation.min();
            max = annotation.max();
            applyIfValang = valangToJS(annotation.applyIf());
        }

        StringBuffer sb = new StringBuffer();
        sb.append(" function() {return this.between(this.lengthOf(this.getPropertyValue(");
        sb.append(wrapAndEscapeJsString(field));// field
View Full Code Here

Examples of org.springmodules.validation.bean.conf.loader.annotation.handler.Max.applyIf()

    @Override
    public String convertToValang(String fieldName, Annotation a, MessageSourceAccessor messages) {
        Max annotation = (Max) a;

        String errMsg = messages.getMessage(annotation.errorCode(), annotation.message());
        String applyIfValang = valangToJS(annotation.applyIf());

        StringBuffer sb = new StringBuffer();
        sb.append(" function() {return this.lessThanOrEquals((this.getPropertyValue(");
        sb.append(wrapAndEscapeJsString(fieldName));// field
        sb.append(")), (");
View Full Code Here

Examples of org.springmodules.validation.bean.conf.loader.annotation.handler.MaxLength.applyIf()

        if (a instanceof MaxLength) {
            MaxLength annotation = (MaxLength) a;
            errMsg = messages.getMessage(annotation.errorCode(), annotation.message());
            value = annotation.value();
            applyIfValang = valangToJS(annotation.applyIf());
        } else if (a instanceof MaxSize) {
            MaxSize annotation = (MaxSize) a;
            errMsg = messages.getMessage(annotation.errorCode(), annotation.message());
            value = annotation.value();
            applyIfValang = valangToJS(annotation.applyIf());
View Full Code Here

Examples of org.springmodules.validation.bean.conf.loader.annotation.handler.MaxLength.applyIf()

            applyIfValang = valangToJS(annotation.applyIf());
        } else if (a instanceof MaxSize) {
            MaxSize annotation = (MaxSize) a;
            errMsg = messages.getMessage(annotation.errorCode(), annotation.message());
            value = annotation.value();
            applyIfValang = valangToJS(annotation.applyIf());
        }

        StringBuffer sb = new StringBuffer();
        sb.append(" function() {return this.lessThanOrEquals((this.lengthOf(this.getPropertyValue(");
        sb.append(wrapAndEscapeJsString(fieldName));// field
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.