Package org.zkoss.zul

Examples of org.zkoss.zul.Constraint


        return (!UserUtil.getUserFromSession().isLibrePlanUser() && passwordModel
                .isLdapAuthEnabled());
    }

    public Constraint validatePasswordConfirmation() {
        return new Constraint() {
            @Override
            public void validate(Component comp, Object value)
                    throws WrongValueException {
                if(StringUtils.isEmpty((String)value) || StringUtils.isEmpty(password.getValue())) {
                    throw new WrongValueException(comp, _("passwords can not be empty"));
View Full Code Here


            }
        };
    }

    public Constraint validateCurrentPassword() {
        return new Constraint() {
            @Override
            public void validate(Component comp, Object value)
                    throws WrongValueException {
                if(!passwordModel.validateCurrentPassword((String)value)) {
                    throw new WrongValueException(comp, _("Current password is incorrect"));
View Full Code Here

            }
        }
    }

    private Constraint checkMaxValue() {
        return new Constraint() {
            @Override
            public void validate(Component comp, Object value)
                    throws WrongValueException {
                Listitem item = (Listitem) comp.getParent().getParent();
                DirectAdvanceAssignment advance = (DirectAdvanceAssignment) item
View Full Code Here

        return hbox;
    }

    private Constraint dateMustBeInsideVisualizationArea(
            final OrderEarnedValueChartFiller earnedValueChartFiller) {
        return new Constraint() {

            @Override
            public void validate(org.zkoss.zk.ui.Component comp,
                    Object valueObject)
                    throws WrongValueException {
View Full Code Here

     * @param row
     */
    private void appendEffortDuration(Row row) {
        WorkReportLine workReportLine = (WorkReportLine) row.getValue();
        Textbox effort = new Textbox();
        effort.setConstraint(new Constraint() {

            @Override
            public void validate(Component comp, Object value)
                    throws WrongValueException {
                if (!Pattern.matches("(\\d+)(\\s*:\\s*\\d+\\s*)*",
 
View Full Code Here

        createPredicate();
        filterByPredicate();
    }

    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

                .isFilterContainers());
        return newPredicate;
    }

    public Constraint checkConstraintFinishDate() {
        return new Constraint() {
            @Override
            public void validate(org.zkoss.zk.ui.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(org.zkoss.zk.ui.Component comp, Object value)
                    throws WrongValueException {
                Date startDate = (Date) value;
                if ((startDate != null)
View Full Code Here

    /**
     * Operations to filter the orders 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

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.