Package org.apache.wicket.validation.validator

Examples of org.apache.wicket.validation.validator.RangeValidator


            super(name);
            if (appRows > 0)
                this.appRows = appRows;
            if (portletRows > 0)
                this.portletRows = portletRows;
            add(new TextField("appRows", new PropertyModel(this, "appRows"), Integer.class).setRequired(true).add(new RangeValidator(1,1000)));
            add(new TextField("portletRows", new PropertyModel(this, "portletRows"), Integer.class).setRequired(true).add(new RangeValidator(1,1000)));
            add(new Button("editModeSaveButton", new ResourceModel("pam.details.action.save"))
            {
                @Override
                public void onSubmit()
                {
View Full Code Here


   * @param component
   */
  @SuppressWarnings("unchecked")
  private void addYavRuleForMinMaxRangeValidatorType(IValidator validator, Component component) {
    if (RangeValidator.class.isAssignableFrom(validator.getClass())) {
      RangeValidator rangeValidator = (RangeValidator) validator;
     
      if (Number.class.isAssignableFrom(rangeValidator.getMinimum().getClass())) {
        buffer.append(messageBuilder.rangeMessage(component, rangeValidator));
      }
    }
  }
View Full Code Here

    form.add(formComponent1);
    form.add(formComponent2);
    form.add(new EqualInputValidator(formComponent1, formComponent2));

    form.add(new RequiredTextField("rangeLong", Long.class)
        .add(new RangeValidator(10L, 20L)));

    // Seems not to be supported by Yav yet
    // form.add(new RequiredTextField("minInt").add(new MinimumValidator(10)));

    // Seems not to be supported by Yav yet
View Full Code Here

TOP

Related Classes of org.apache.wicket.validation.validator.RangeValidator

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.