Examples of Datebox


Examples of org.zkoss.zul.Datebox

    public void setStartAllocationDate(Event event) {
        setStartAllocationDate(getSelectedGap().getStartTime());
    }

    public void highlightCalendar(Event event) {
        Datebox datebox = (Datebox) event.getTarget();
        if (datebox.getValue() == null) {
            final LocalDate startDate = getSelectedGap().getStartTime().getDate();
            datebox.setValue(toDate(startDate));
        }

        if (isAppropriative()) {
            final LimitingResourceQueueElement beingEdited = getBeingEditedElement();
            highlightDaysFromDate(datebox.getUuid(), new LocalDate(beingEdited.getEarliestStartDateBecauseOfGantt()));
        } else {
            highlightDaysInGap(datebox.getUuid(), getSelectedGap());
        }
    }
View Full Code Here

Examples of org.zkoss.zul.Datebox

            }
        }
    }

    public void createDateBox(Textbox textbox) {
        openedDateBox = new Datebox();
        openedDateBox.setFormat("short");
        openedDateBox.setButtonVisible(false);

        try {
            openedDateBox.setValue(dateFormat.parse(textbox.getValue()));
View Full Code Here

Examples of org.zkoss.zul.Datebox

            }
        };
    }

    private void validateEndDate(Component comp, Object value) {
        Datebox startDateBox = (Datebox) comp.getPreviousSibling();
        if (startDateBox != null) {
            if (startDateBox.getValue() != null) {
                if (startDateBox.getValue().compareTo((Date) value) > 0) {
                    throw new WrongValueException(
                            comp,
                            _("End date is not valid, the new end date must be after start date"));
                }
            }
View Full Code Here

Examples of org.zkoss.zul.Datebox

        this.dateFormat = DateFormat.getDateInstance(DateFormat.SHORT, Locales
                .getCurrent());
    }

    public Datebox createDateBox() {
        dateBox = new Datebox();
        dateBox.setFormat("short");
        dateBox.setValue(getter.get());
        registerOnEnterOpenDateBox(dateBox);
        registerBlurListener(dateBox);
        registerOnChange(dateBox);
View Full Code Here

Examples of org.zkoss.zul.Datebox

         if(listingCriterions != null){
            Rows rows = listingCriterions.getRows();
            List<Row> listRows = rows.getChildren();
            for(Row row : listRows){
                //Validate endDate Domain Restricctions.
                Datebox endDate = getEndDatebox(row);
                if(isInvalid(endDate)){
                    validateEndDate(endDate, endDate.getValue());
                }
                //Validate startDate Domain Restricctions.
                Datebox startDate = getStartDatebox(row);
                if(isInvalid(startDate)){
                    validateStartDate(startDate, startDate.getValue());
                }
                //Validate endDate Domain Restricctions.
                Bandbox bandCriterion = getBandType(row);
                if(isInvalid(bandCriterion)){
                    CriterionSatisfactionDTO satisfactionDTO =
View Full Code Here

Examples of org.zkoss.zul.Datebox

            if (row != null) {
                String propertyName = invalidValue.getPropertyPath();

                if (CriterionSatisfactionDTO.START_DATE.equals(propertyName)) {
                    // Locate TextboxResource
                    Datebox startDate = getStartDatebox(row);
                    // Value is incorrect, clear
                    startDate.setValue(null);
                    throw new WrongValueException(startDate,
                            _("cannot be empty"));
                }
                if (CriterionSatisfactionDTO.CRITERION_WITH_ITS_TYPE.equals(propertyName)) {
                    // Locate TextboxResource
View Full Code Here

Examples of org.zkoss.zul.Datebox

        labelName.setParent(row);
        labelName.setValue(label);
    }

    private void appendDate(final Row row) {
        Datebox date = new Datebox();
        date.setParent(row);

        final TaskQualityForm taskQualityForm = getTaskQualityFormByRow(row);
        final TaskQualityFormItem item = (TaskQualityFormItem) row.getValue();

        Util.bind(date, new Util.Getter<Date>() {
            @Override
            public Date get() {
                return item.getDate();
            }
        }, new Util.Setter<Date>() {

            @Override
            public void set(Date value) {
                item.setDate(value);
                updateAdvancesIfNeeded();
            }
        });

        date.setDisabled(assignedTaskQualityFormsToOrderElementModel
                .isDisabledDateItem(taskQualityForm, item));
        date.setConstraint(checkConsecutiveDate(row));
    }
View Full Code Here

Examples of org.zkoss.zul.Datebox

                Row rowItem = findRowOfTaskQualityFormItem(row, itemName);

                if (rowItem != null) {
                    if (TaskQualityFormItem.propertyDate.equals(propertyName)) {
                        openDetails(rowItem);
                        Datebox datebox = getDatebox(rowItem);
                        throw new WrongValueException(datebox,
                                _(invalidValue.getMessage()));
                    }
                    if (TaskQualityFormItem.propertyPassed.equals(propertyName)) {
                        openDetails(rowItem);
View Full Code Here

Examples of org.zkoss.zul.Datebox

        if (listingCriterions != null) {
            Rows rows = listingCriterions.getRows();
            List<Row> listRows = rows.getChildren();
            for (Row row : listRows) {
                // Validate endDate Domain Restricctions.
                Datebox endDate = getEndDatebox(row);
                if (isInvalid(endDate)) {
                    validateEndDate(endDate, endDate.getValue());
                }
                // Validate startDate Domain Restricctions.
                Datebox startDate = getStartDatebox(row);
                if (isInvalid(startDate)) {
                    validateStartDate(startDate, startDate.getValue());
                }
                // Validate endDate Domain Restricctions.
                Bandbox bandCriterion = getBandType(row);
                if (isInvalid(bandCriterion)) {
                    CriterionSatisfactionDTO satisfactionDTO = (CriterionSatisfactionDTO) row
View Full Code Here

Examples of org.zkoss.zul.Datebox

            if (row != null) {
                String propertyName = invalidValue.getPropertyPath();

                if (CriterionSatisfactionDTO.START_DATE.equals(propertyName)) {
                    // Locate TextboxResource
                    Datebox startDate = getStartDatebox(row);
                    // Value is incorrect, clear
                    startDate.setValue(null);
                    throw new WrongValueException(startDate,
                            _("cannot be empty"));
                }
                if (CriterionSatisfactionDTO.CRITERION_WITH_ITS_TYPE
                        .equals(propertyName)) {
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.