Package org.zkoss.zul

Examples of org.zkoss.zul.Constraint


            }
        };
    }

    public Constraint checkConstraintStartDate() {
        return new Constraint() {
            @Override
            public void validate(Component comp, Object value)
                    throws WrongValueException {
                Date startDate = (Date) value;
                if ((startDate != null)
View Full Code Here


        }
        return new TreeSet<DeadlineCommunication>(new DeliverDateComparator());
    }

    public Constraint chekValidProjectName() {
        return new Constraint() {
            @Override
            public void validate(Component comp, Object value)
                    throws WrongValueException {

                if (StringUtils.isBlank((String) value)) {
View Full Code Here

            }
        };
    }

    public Constraint chekValidProjectCode() {
        return new Constraint() {
            @Override
            public void validate(Component comp, Object value)
                    throws WrongValueException {

                if (StringUtils.isBlank((String) value)) {
View Full Code Here

            result.setDescription(description);
            return result;
        }

        private void setConstraintsFor(final SchedulingMode mode) {
            initDate.setConstraint(new Constraint() {

                @Override
                public void validate(Component comp, Object value)
                        throws WrongValueException {
                    if (value == null) {
                        if (mode == SchedulingMode.FORWARD) {
                            throw new WrongValueException(
                                    comp,
                                    _("Starting date cannot be empty in forward mode"));
                        }
                        if (orderModel
                                .isAnyTaskWithConstraint(PositionConstraintType.AS_SOON_AS_POSSIBLE)) {
                            throw new WrongValueException(comp,
                                    _("Starting date cannot be empty because there is a task with constraint \"as soon as possible\""));
                        }
                    }
                }
            });
            deadline.setConstraint(new Constraint() {

                @Override
                public void validate(Component comp, Object value)
                        throws WrongValueException {
                    if (value == null) {
View Full Code Here

TOP

Related Classes of org.zkoss.zul.Constraint

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.