Package org.zkoss.zk.ui

Examples of org.zkoss.zk.ui.WrongValueException


                    try {
                        if (getElement() instanceof OrderLine) {
                            ((OrderLine) getElement()).setWorkHours(intValue);
                        }
                    } catch (IllegalArgumentException e) {
                        throw new WrongValueException(comp, _(e.getMessage()));
                    }
                }
            }
        };
    }
View Full Code Here


                HoursGroupWrapper hoursGroupWrapper = (HoursGroupWrapper) ((Row) comp
                        .getParent()).getValue();
                try {
                    hoursGroupWrapper.setPercentage((BigDecimal) value);
                } catch (IllegalArgumentException e) {
                    throw new WrongValueException(comp, _(e.getMessage()));
                }
            }
        };
    }
View Full Code Here

                if ((finishDateLine != null)
                        && (filterStartDateLine.getValue() != null)
                        && (finishDateLine.compareTo(filterStartDateLine
                                .getValue()) < 0)) {
                    filterFinishDateLine.setValue(null);
                    throw new WrongValueException(comp,
                            _("must be after start date"));
                }
            }
        };
    }
View Full Code Here

                if ((startDateLine != null)
                        && (filterFinishDateLine.getValue() != null)
                        && (startDateLine.compareTo(filterFinishDateLine
                                .getValue()) > 0)) {
                    filterStartDateLine.setValue(null);
                    throw new WrongValueException(comp,
                            _("must be lower than end date"));
                }
            }
        };
    }
View Full Code Here

                && ((orderElement.getCode() != null) && (!orderElement
                        .getCode().isEmpty()))) {
            try {
                return workReportModel.findOrderElement(orderElement.getCode());
            } catch (InstanceNotFoundException e) {
                throw new WrongValueException(bandboxFilterOrderElement,
                        _("Task not found"));
            }
        }
        return null;
    }
View Full Code Here

            getWorker().setUser(null);
        }

        if (UserBindingOption.EXISTING_USER.ordinal() == option) {
            if (getWorker().getUser() == null) {
                throw new WrongValueException(userBandbox,
                        _("please select a user to bound"));
            }
            getWorker().updateUserData();
        }
View Full Code Here

    }

    private User createNewUserForBinding() {
        String loginName = loginNameTextbox.getValue();
        if (StringUtils.isBlank(loginName)) {
            throw new WrongValueException(loginNameTextbox,
                    _("cannot be empty"));
        }

        String password = passwordTextbox.getValue();
        if (StringUtils.isBlank(loginName)) {
            throw new WrongValueException(passwordTextbox,
                    _("cannot be empty"));
        }

        String passwordConfirmation = passwordConfirmationTextbox.getValue();
        if (!password.equals(passwordConfirmation)) {
            throw new WrongValueException(passwordConfirmationTextbox,
                    _("passwords do not match"));
        }

        String encodedPassword = dbPasswordEncoderService.encodePassword(
                password, loginName);
View Full Code Here

    private void createCalendar() {
        Combobox combobox = (Combobox) getCurrentWindow().getFellow(
                "createDerivedCalendar");
        Comboitem selectedItem = combobox.getSelectedItem();
        if (selectedItem == null) {
            throw new WrongValueException(combobox,
                    "You should select one calendar");
        }
        BaseCalendar parentCalendar = (BaseCalendar) combobox.getSelectedItem()
                .getValue();
        if (parentCalendar == null) {
View Full Code Here

                Date finishDate = (Date) value;
                if ((finishDate != null)
                        && (filterStartDate.getValue() != null)
                        && (finishDate.compareTo(filterStartDate.getValue()) < 0)) {
                    filterFinishDate.setValue(null);
                    throw new WrongValueException(comp,
                            _("must be after start date"));
                }
            }
        };
    }
View Full Code Here

                Date startDate = (Date) value;
                if ((startDate != null)
                        && (filterFinishDate.getValue() != null)
                        && (startDate.compareTo(filterFinishDate.getValue()) > 0)) {
                    filterStartDate.setValue(null);
                    throw new WrongValueException(comp,
                            _("must be lower than end date"));
                }
            }
        };
    }
View Full Code Here

TOP

Related Classes of org.zkoss.zk.ui.WrongValueException

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.