Package com.scooterframework.common.validation

Examples of com.scooterframework.common.validation.ValidationResults


   
    /**
     * Returns controller validation results.
     */
    public static ValidationResults currentValidationResults() {
        ValidationResults vr = (ValidationResults)CurrentThreadCache.get(KEY_ValidationResults);
        if (vr == null) {
            vr = new ValidationResults();
            CurrentThreadCache.set(KEY_ValidationResults, vr);
        }
        return vr;
    }
View Full Code Here


     * @param record an ActiveRecord instance
     * @return List of error messages.
     */
    public static List<Message> getErrorMessages(ActiveRecord record) {
        if (record != null) {
            ValidationResults vr = record.getValidationResults();
            if (vr.failed()) {
                return vr.getErrorMessages();
            }
        }
        return null;
    }
View Full Code Here

TOP

Related Classes of com.scooterframework.common.validation.ValidationResults

Copyright © 2018 www.massapicom. 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.