org.springmodules.validation.valang.javascript.taglib
Class ValangJavaScriptTagUtils

java.lang.Object
  extended by org.springmodules.validation.valang.javascript.taglib.ValangJavaScriptTagUtils

public abstract class ValangJavaScriptTagUtils
extends java.lang.Object

Static helper methods that place a ValangValidator into a model so that is is accessible to the JSP custom tag ValangValidateTag.

Author:
Oliver Hutchison

Constructor Summary
ValangJavaScriptTagUtils()
           
 
Method Summary
static void addValangRulesToModel(BaseCommandController controller, java.util.Map model)
          Inserts the valang validator from the provided controller into the model using the controller's name as the validation rule's key.
static void addValangRulesToModel(java.lang.String commandName, ValangValidator validator, java.util.Map model)
          Inserts the provided validator into the model using the provided command name as the validation rule's key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValangJavaScriptTagUtils

public ValangJavaScriptTagUtils()
Method Detail

addValangRulesToModel

public static void addValangRulesToModel(BaseCommandController controller,
                                         java.util.Map model)
Inserts the valang validator from the provided controller into the model using the controller's name as the validation rule's key.

Parameters:
controller - the controller that will provide the command name and validator
model - the model into which the validation rules will be placed
Throws:
java.lang.IllegalArgumentException - if the controller does not specify a command name
java.lang.IllegalArgumentException - if the controller's validator is not an instance of ValangValidator

addValangRulesToModel

public static void addValangRulesToModel(java.lang.String commandName,
                                         ValangValidator validator,
                                         java.util.Map model)
Inserts the provided validator into the model using the provided command name as the validation rule's key.

Parameters:
commandName - the command name
validator - the valang validator
model - the model into which the validation rules will be placed


Copyright © 2005. All Rights Reserved.