org.wicketstuff.validation.client
Class ClientAndServerLengthBetweenValidatingBehavior

java.lang.Object
  extended by org.apache.wicket.behavior.Behavior
      extended by org.wicketstuff.validation.client.AbstractClientAndServerValidatingBehavior
          extended by org.wicketstuff.validation.client.ClientAndServerLengthBetweenValidatingBehavior
All Implemented Interfaces:
Serializable, IClusterable

public class ClientAndServerLengthBetweenValidatingBehavior
extends AbstractClientAndServerValidatingBehavior

Validates that the form component value has a length between the min and the max specified (inclusive).

Author:
Jeremy Thomerson
See Also:
Serialized Form

Constructor Summary
ClientAndServerLengthBetweenValidatingBehavior(Form<?> form, int min, int max)
           
 
Method Summary
protected  void addServerSideValidator(FormComponent component)
           
protected  String createValidatorConstructorJavaScript(CharSequence formID, CharSequence compID, CharSequence escapedMessage)
           
protected  String getResourceKey()
           
protected  String getValidatorJSClassName()
           
protected  Map<String,Object> variablesMap(Form<?> form, FormComponent<?> component)
           
 
Methods inherited from class org.wicketstuff.validation.client.AbstractClientAndServerValidatingBehavior
bind, checkComponentIsFormComponent, jsEscape, renderHead
 
Methods inherited from class org.apache.wicket.behavior.Behavior
afterRender, beforeRender, canCallListenerInterface, detach, getStatelessHint, isEnabled, isTemporary, onComponentTag, onConfigure, onException, unbind
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientAndServerLengthBetweenValidatingBehavior

public ClientAndServerLengthBetweenValidatingBehavior(Form<?> form,
                                                      int min,
                                                      int max)
Method Detail

addServerSideValidator

protected void addServerSideValidator(FormComponent component)
Specified by:
addServerSideValidator in class AbstractClientAndServerValidatingBehavior

createValidatorConstructorJavaScript

protected String createValidatorConstructorJavaScript(CharSequence formID,
                                                      CharSequence compID,
                                                      CharSequence escapedMessage)
Overrides:
createValidatorConstructorJavaScript in class AbstractClientAndServerValidatingBehavior

variablesMap

protected Map<String,Object> variablesMap(Form<?> form,
                                          FormComponent<?> component)
Overrides:
variablesMap in class AbstractClientAndServerValidatingBehavior

getResourceKey

protected String getResourceKey()
Overrides:
getResourceKey in class AbstractClientAndServerValidatingBehavior
Returns:
the resource key where the 'failed' message for this validator can be found

getValidatorJSClassName

protected String getValidatorJSClassName()
Overrides:
getValidatorJSClassName in class AbstractClientAndServerValidatingBehavior


Copyright © 2011. All Rights Reserved.