Package org.apache.wicket.markup.html.form.validation

Examples of org.apache.wicket.markup.html.form.validation.IFormValidator


    if (validator == null)
    {
      throw new IllegalArgumentException("Argument `validator` cannot be null");
    }

    IFormValidator removed = formValidators_remove(validator);
    if (removed == null)
    {
      throw new IllegalStateException(
        "Tried to remove form validator that was not previously added. "
          + "Make sure your validator's equals() implementation is sufficient");
View Full Code Here


  {
    if (formValidators != null)
    {
      if (formValidators instanceof IFormValidator)
      {
        final IFormValidator v = (IFormValidator)formValidators;
        if (v == validator || v.equals(validator))
        {
          return 0;
        }
      }
      else
      {
        final IFormValidator[] validators = (IFormValidator[])formValidators;
        for (int i = 0; i < validators.length; i++)
        {
          final IFormValidator v = validators[i];
          if (v == validator || v.equals(validator))
          {
            return i;
          }
        }
      }
View Full Code Here

  {
    if (formValidators instanceof IFormValidator)
    {
      if (index == 0)
      {
        final IFormValidator removed = (IFormValidator)formValidators;
        formValidators = null;
        return removed;
      }
      else
      {
        throw new IndexOutOfBoundsException();
      }
    }
    else
    {
      final IFormValidator[] validators = (IFormValidator[])formValidators;
      final IFormValidator removed = validators[index];
      // check if we can collapse array of 1 element into a single object
      if (validators.length == 2)
      {
        formValidators = validators[1 - index];
      }
View Full Code Here

    if (validator == null)
    {
      throw new IllegalArgumentException("Argument `validator` cannot be null");
    }

    IFormValidator removed = formValidators_remove(validator);
    if (removed == null)
    {
      throw new IllegalStateException(
        "Tried to remove form validator that was not previously added. "
          + "Make sure your validator's equals() implementation is sufficient");
View Full Code Here

  {
    if (formValidators != null)
    {
      if (formValidators instanceof IFormValidator)
      {
        final IFormValidator v = (IFormValidator)formValidators;
        if (v == validator || v.equals(validator))
        {
          return 0;
        }
      }
      else
      {
        final IFormValidator[] validators = (IFormValidator[])formValidators;
        for (int i = 0; i < validators.length; i++)
        {
          final IFormValidator v = validators[i];
          if (v == validator || v.equals(validator))
          {
            return i;
          }
        }
      }
View Full Code Here

  {
    if (formValidators instanceof IFormValidator)
    {
      if (index == 0)
      {
        final IFormValidator removed = (IFormValidator)formValidators;
        formValidators = null;
        return removed;
      }
      else
      {
        throw new IndexOutOfBoundsException();
      }
    }
    else
    {
      final IFormValidator[] validators = (IFormValidator[])formValidators;
      final IFormValidator removed = validators[index];
      // check if we can collapse array of 1 element into a single object
      if (validators.length == 2)
      {
        formValidators = validators[1 - index];
      }
View Full Code Here

      if (isActiveStep())
      {
        Set components = new HashSet();
        for (Iterator i = validators.iterator(); i.hasNext();)
        {
          IFormValidator v = (IFormValidator)i.next();
          FormComponent[] dependentComponents = v.getDependentFormComponents();
          if (dependentComponents != null)
          {
            int len = dependentComponents.length;
            for (int j = 0; j < len; j++)
            {
View Full Code Here

    {
      if (isActiveStep())
      {
        for (Iterator i = validators.iterator(); i.hasNext();)
        {
          IFormValidator v = (IFormValidator)i.next();
          v.validate(form);
        }
      }
    }
View Full Code Here

    if (validator == null)
    {
      throw new IllegalArgumentException("Argument `validator` cannot be null");
    }

    IFormValidator removed = formValidators_remove(validator);
    if (removed == null)
    {
      throw new IllegalStateException(
        "Tried to remove form validator that was not previously added. "
          + "Make sure your validator's equals() implementation is sufficient");
View Full Code Here

  {
    if (formValidators != null)
    {
      if (formValidators instanceof IFormValidator)
      {
        final IFormValidator v = (IFormValidator)formValidators;
        if (v == validator || v.equals(validator))
        {
          return 0;
        }
      }
      else
      {
        final IFormValidator[] validators = (IFormValidator[])formValidators;
        for (int i = 0; i < validators.length; i++)
        {
          final IFormValidator v = validators[i];
          if (v == validator || v.equals(validator))
          {
            return i;
          }
        }
      }
View Full Code Here

TOP

Related Classes of org.apache.wicket.markup.html.form.validation.IFormValidator

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.