Package org.zkoss.zul

Examples of org.zkoss.zul.Constraint


    public UnitType getUnitType() {
        return unitTypeModel.getCurrentUnitType();
    }

    public Constraint uniqueMeasureName() {
        return new Constraint() {

            @Override
            public void validate(Component comp, Object value) {
                String strValue = (String) value;
                if (StringUtils.isBlank(strValue)) {
View Full Code Here


            }
        };
    }

    public Constraint uniqueCode() {
        return new Constraint() {

            @Override
            public void validate(Component comp, Object value) {
                String strValue = (String) value;
                if (StringUtils.isBlank(strValue)) {
View Full Code Here

     * Validates {@link Textbox} checking {@link Constraint}
     * @param comp
     */
    private void validate(Textbox comp) {
        if (comp != null && comp.getConstraint() != null && !comp.isDisabled()) {
            final Constraint constraint = comp.getConstraint();
            constraint.validate(comp, comp.getValue());
        }
    }
View Full Code Here

        order.setInitDate(new Date());
        order.setCalendar(defaultCalendar);
    }

    public Constraint checkConstraintFinishDate() {
        return new Constraint() {
            @Override
            public void validate(Component comp, Object value)
                    throws WrongValueException {
                Date finishDate = (Date) value;
                if ((finishDate != null) && (initDate.getValue() != null)
View Full Code Here

            }
        };
    }

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

                public void onEvent(Event event) throws Exception {
                    reloadWorkWeeksList();
                }
            });

            datebox.setConstraint(new Constraint() {
                @Override
                public void validate(Component comp, Object value)
                        throws WrongValueException {
                    try {
                        baseCalendarModel.checkAndChangeStartDate(version,
View Full Code Here

                public void onEvent(Event event) throws Exception {
                    reloadWorkWeeksList();
                }
            });

            datebox.setConstraint(new Constraint() {
                @Override
                public void validate(Component comp, Object value)
                        throws WrongValueException {
                    Date date = ((Date) value);
                    try {
View Full Code Here

        ((Textbox)editWindow.getFellowIfAny("passwordConfirmation")).
            clearErrorMessage(true);
    }

    public Constraint validatePasswordConfirmation() {
        return new Constraint() {
            @Override
            public void validate(Component comp, Object value)
                    throws WrongValueException {
                ((Textbox)comp).setRawValue(value);
                if(!((String)value).equals(passwordBox.getValue())) {
View Full Code Here

    /**
     * Operations to filter the tasks by multiple filters
     */

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

            }
        };
    }

    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

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.