Examples of SystemNotificationForm


Examples of com.sparc.knappsack.forms.SystemNotificationForm

        return SystemNotificationForm.class.isAssignableFrom(aClass);
    }

    @Override
    public void validate(Object o, Errors errors) {
        SystemNotificationForm systemNotificationForm = (SystemNotificationForm) o;

        if (!doesBindingErrorExist(errors, START_DATE) && systemNotificationForm.getStartDate() == null) {
            errors.rejectValue(START_DATE, "systemNotificationValidator.startDate");
        }

        if (!doesBindingErrorExist(errors, END_DATE) && systemNotificationForm.getStartDate() != null && systemNotificationForm.getEndDate() != null && !systemNotificationForm.getEndDate().after(systemNotificationForm.getStartDate())) {
            errors.rejectValue(END_DATE, "systemNotificationValidator.endDate");
        }

        if (!doesBindingErrorExist(errors, MESSAGE) && !StringUtils.hasText(systemNotificationForm.getMessage())) {
            errors.rejectValue(MESSAGE, "systemNotificationValidator.message");
        }

        if (!doesBindingErrorExist(errors, NOTIFICATION_TYPE) && systemNotificationForm.getNotificationType() == null) {
            errors.rejectValue(NOTIFICATION_TYPE, "systemNotificationValidator.notificationType");
        }

        if (!doesBindingErrorExist(errors, NOTIFICATION_SEVERITY) && systemNotificationForm.getNotificationSeverity() == null) {
            errors.rejectValue(NOTIFICATION_SEVERITY, "systemNotificationValidator.notificationSeverity");
        }
    }
View Full Code Here

Examples of com.sparc.knappsack.forms.SystemNotificationForm

        model.addAttribute("applicationCount", applicationService.countAll());
        model.addAttribute("systemNotificationTypes", SystemNotificationType.values());
        model.addAttribute("systemNotificationSeverityTypes", SystemNotificationSeverity.values());

        if (!model.containsAttribute("systemNotificationForm")) {
            model.addAttribute("systemNotificationForm", new SystemNotificationForm());
        }

        if (notificationUpdateSuccess != null) {
            model.addAttribute("notificationUpdateSuccess", notificationUpdateSuccess.booleanValue());
        }
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.