Package org.zkoss.zul

Examples of org.zkoss.zul.Constraint


            }
        };
    }

    public Constraint validateWorkReportTypeCode() {
        return new Constraint() {
            @Override
            public void validate(Component comp, Object value)
                    throws WrongValueException {
                try {
                    workReportTypeModel
View Full Code Here


        }
    }

    public Constraint validateIfExistTheSameFieldName(
            final DescriptionField descriptionField) {
        return new Constraint() {
            @Override
            public void validate(Component comp, Object value)
                    throws WrongValueException {
                descriptionField.setFieldName((String) value);
                if ((getWorkReportType() != null)
View Full Code Here

        getQualityForm().updateAndSortQualityFormItem();
        Util.reloadBindings(gridQualityFormItems);
    }

    public Constraint checkConstraintUniqueQualityFormName() {
        return new Constraint() {
            @Override
            public void validate(Component comp, Object value)
                    throws WrongValueException {
                getQualityForm().setName((String) value);
                if(((String)value == null) || (((String)value)).isEmpty()){
View Full Code Here

            }
        };
    }

    public Constraint checkConstraintQualityFormItemName() {
        return new Constraint() {
            @Override
            public void validate(Component comp, Object value)
                    throws WrongValueException {
                QualityFormItem item = (QualityFormItem) ((Row) comp
                        .getParent()).getValue();
View Full Code Here

            }
        };
    }

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

                QualityFormItem item = (QualityFormItem) ((Row) comp
View Full Code Here

    private Date getEndingDate() {
        return endingDate.getValue();
    }

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

            }
        };
    }

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

            expenseSheetLine.setResource(resource);
        }
    }

    public Constraint checkConstraintExpenseValue() {
        return new Constraint() {
            @Override
            public void validate(Component comp, Object value) throws WrongValueException {
                BigDecimal expenseValue = (BigDecimal) value;
                if (expenseValue == null || expenseValue.compareTo(BigDecimal.ZERO) < 0) {
                    throw new WrongValueException(comp, _("must be greater or equal than 0"));
View Full Code Here

            }
        };
    }

    public Constraint checkConstraintLineCodes(final ExpenseSheetLine line) {
        return new Constraint() {
            @Override
            public void validate(Component comp, Object value) throws WrongValueException {
                if (!getExpenseSheet().isCodeAutogenerated()) {
                    String code = (String) value;
                    if (code == null || code.isEmpty()) {
View Full Code Here

            }
        };
    }

    public Constraint checkConstraintExpendeCode() {
        return new Constraint() {
            @Override
            public void validate(Component comp, Object value) throws WrongValueException {
                if (!getExpenseSheet().isCodeAutogenerated()) {
                    String code = (String) value;
                    if (code == null || code.isEmpty()) {
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.