Package com.smartgwt.client.widgets.form.validator

Examples of com.smartgwt.client.widgets.form.validator.CustomValidator


        advancedEndItem = new DateTimeItem(ADVANCED_END_ITEM, MSG.common_title_end());
        advancedEndItem.setUseMask(true);
        advancedEndItem.setDisplayFormat(DateDisplayFormat.TOUSSHORTDATE);

        //time validator, start should be before end
        CustomValidator timeValidator = new CustomValidator() {
            protected boolean condition(Object value) {
                return advancedEndItem.getValueAsDate().after(advancedStartItem.getValueAsDate());
            }
        };
        timeValidator.setErrorMessage(MSG.view_measureTable_startBeforeEnd());
        advancedStartItem.setValidators(timeValidator);

        setButton = new ButtonItem(SET_ITEM, MSG.common_button_set());
        setButton.setStartRow(false);
        setButton.setEndRow(false);
View Full Code Here

TOP

Related Classes of com.smartgwt.client.widgets.form.validator.CustomValidator

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.