Examples of CustomValidator


Examples of com.opensymphony.xwork2.validator.annotations.CustomValidator

                        result.add(temp);
                    }
                }
                // Process single custom validator
                else if (a instanceof CustomValidator) {
                    CustomValidator v = (CustomValidator) a;
                    ValidatorConfig temp = processCustomValidatorAnnotation(v, fieldName, methodName);
                    if (temp != null) {
                        result.add(temp);
                    }
                }
View Full Code Here

Examples of com.opensymphony.xwork2.validator.annotations.CustomValidator

                        result.add(temp);
                    }
                }
                // Process single custom validator
                else if (a instanceof CustomValidator) {
                    CustomValidator v = (CustomValidator) a;
                    ValidatorConfig temp = processCustomValidatorAnnotation(v, fieldName, methodName);
                    if (temp != null) {
                        result.add(temp);
                    }
                }
View Full Code Here

Examples of com.opensymphony.xwork2.validator.annotations.CustomValidator

                        result.add(temp);
                    }
                }
                // Process single custom validator
                else if (a instanceof CustomValidator) {
                    CustomValidator v = (CustomValidator) a;
                    ValidatorConfig temp = processCustomValidatorAnnotation(v, fieldName, methodName);
                    if (temp != null) {
                        result.add(temp);
                    }
                }
View Full Code Here

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

Examples of org.openfaces.validator.CustomValidator

*/
public class ValidateCustomTag extends AbstractCustomValidatorTag {
    @Override
    public void setProperties(AbstractCustomValidator abstractCustomValidator) {
        super.setProperties(abstractCustomValidator);
        CustomValidator customValidator = (CustomValidator) abstractCustomValidator;
        String clientFunction = getPropertyValue("clientFunction");
        customValidator.setClientFunction(clientFunction);
        String serverFunction = getPropertyValue("serverFunction");
        if (serverFunction != null) {
            if (AbstractComponentTag.isValueReference(serverFunction)) {
                Class[] args = {FacesContext.class, UIComponent.class, Object.class};
                FacesContext facesContext = FacesContext.getCurrentInstance();
                MethodExpression methodExpression = createMethodExpression(facesContext, "serverFunction", serverFunction, boolean.class, args);
                Class resultType = methodExpression.getMethodInfo(facesContext.getELContext()).getReturnType();
                if (!resultType.equals(boolean.class))
                    throw new IllegalArgumentException("serverFunction error. Requred return value: boolean. Currently defined: " + resultType);
                customValidator.setServerFunction(methodExpression);
            } else {
                throw new IllegalArgumentException("Invalid value of serverFunction attribute. Must be a value reference. Currently defined: " + serverFunction);
            }
        }

View Full Code Here

Examples of org.wicketstuff.rest.CustomValidator

  protected void onInitialize(TextualWebSerialDeserial objSerialDeserial)
  {
    EmailAddressValidator emailValidator = EmailAddressValidator.getInstance();

    registerValidator("emailvalidator", emailValidator);
    registerValidator("customvalidator", new CustomValidator());
  }
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.