ValidateThis API Documentation

ValidateThis.client
Class AbstractClientScriptWriter

WEB-INF.cftags.component
        extended by ValidateThis.client.AbstractClientScriptWriter
Direct Known Subclasses:
ClientScriptWriter_jQuery

public class AbstractClientScriptWriter
extends WEB-INF.cftags.component

I am an abstract class responsible for generating script for a particular JS implementation (e.g., qForms, jQuery, etc.).


Constructor Summary
init(any childObjectFactory, any Translator, any messageHelper, string JSRoot, string extraClientScriptWriterComponentPaths, string defaultFailureMessagePrefix, string vtFolder)
          I build a new ClientScriptWriter
 
Method Summary
 any generateJSFieldRefence(any fieldname, Any formName)
          I generate the JS script that references the field name
 any generateJSIncludeScript()
          I generate the JS to load the required JS libraries
 any generateLocaleScript([Any locale=''])
          I generate the JS to load the required locale specific JS libraries
 any generateScriptFooter()
          I generate the JS script required at the top of the script block
 any generateScriptHeader(any formName)
          I generate the JS script required at the top of the script block
 any generateVTSetupScript()
          I generate the JS to do some initial setup
 any generateValidationScript(any validation, Any formName, Any locale)
          I generate the JS script required to implement a validation
 any getRuleScripters()
 any getSafeFormName(Any formName)
          I generate a form name that is safe to use as part of a JS variable
private void setRuleScripters()
          I create rule validator objects from a list of component paths
 
Methods inherited from class WEB-INF.cftags.component
 

Constructor Detail

init

public init(any childObjectFactory, any Translator, any messageHelper, string JSRoot, string extraClientScriptWriterComponentPaths, string defaultFailureMessagePrefix, string vtFolder)
I build a new ClientScriptWriter

Parameters:
childObjectFactory
Translator
messageHelper
JSRoot
extraClientScriptWriterComponentPaths
defaultFailureMessagePrefix
vtFolder
Method Detail

generateJSFieldRefence

public any generateJSFieldRefence(any fieldname, Any formName)
I generate the JS script that references the field name.

Parameters:
fieldname - The field name.
formName - The form name.

generateJSIncludeScript

public any generateJSIncludeScript()
I generate the JS to load the required JS libraries.


generateLocaleScript

public any generateLocaleScript([Any locale=''])
I generate the JS to load the required locale specific JS libraries.

Parameters:
locale

generateScriptFooter

public any generateScriptFooter()
I generate the JS script required at the top of the script block.


generateScriptHeader

public any generateScriptHeader(any formName)
I generate the JS script required at the top of the script block.

Parameters:
formName

generateVTSetupScript

public any generateVTSetupScript()
I generate the JS to do some initial setup.


generateValidationScript

public any generateValidationScript(any validation, Any formName, Any locale)
I generate the JS script required to implement a validation.

Parameters:
validation - The validation struct that describes the validation.
formName
locale

getRuleScripters

public any getRuleScripters()


getSafeFormName

public any getSafeFormName(Any formName)
I generate a form name that is safe to use as part of a JS variable.

Parameters:
formName

setRuleScripters

private void setRuleScripters()
I create rule validator objects from a list of component paths


ValidateThis API Documentation