Method Summary |
|
protected List | createActionList(ValidatorResources resources, Form form) Get List of actions for the given Form. |
protected String | createMethods(List actions) Creates the JavaScript methods list from the given actions.
Parameters: actions - A List of ValidatorAction objects. |
protected String | escapeJavascript(String str) Backslash-escapes the following characters from the input string:
", ', \, \r, \n.
This method escapes characters that will result in an invalid
Javascript statement within the validator Javascript.
Parameters: str - The string to escape. |
public boolean | getCdata() Returns the cdata setting "true" or "false". |
public String | getDynamicJavascript() Render just the dynamic JavaScript to perform validations based
on the form name attribute of the action mapping associated
with the current request (if such exists). |
public String | getDynamicJavascript(String formName) Render just the dynamic JavaScript to perform validations based
on the supplied form name. |
protected String | getDynamicJavascript(ValidatorResources resources, Locale locale, Form form) Generates the dynamic JavaScript for the form. |
public boolean | getHtmlComment() Gets whether or not to delimit the
JavaScript with html comments. |
public String | getJavascript() Render both dynamic and static JavaScript to perform
validations based on the form name attribute of the action
mapping associated with the current request (if such exists). |
public String | getJavascript(String formName) Render both dynamic and static JavaScript to perform
validations based on the supplied form name. |
protected String | getJavascript(String formName, boolean getStatic) Render both dynamic and static JavaScript to perform
validations based on the supplied form name. |
protected String | getJavascriptBegin(String methods) Returns the opening script element and some initial javascript. |
protected String | getJavascriptEnd() Returns the closing script element. |
protected String | getJavascriptStaticMethods(ValidatorResources resources) |
public String | getMethod() Gets the method name that will be used for the Javascript
validation method name if it has a value. |
public int | getPage() Gets the current page number of a multi-part form. |
public String | getSrc() Gets the src attribute's value when defining
the html script element. |
public String | getStaticJavascript() Render just the static JavaScript methods. |
public void | init(Object obj) Initializes this tool. |
public void | setCdata(boolean cdata) Sets the cdata status. |
public void | setHtmlComment(boolean htmlComment) Sets whether or not to delimit the
JavaScript with html comments. |
public void | setMethod(String methodName) Sets the method name that will be used for the Javascript
validation method name if it has a value. |
public void | setPage(int page) Sets the current page number of a multi-part form. |
public void | setSrc(String src) Sets the src attribute's value (used to include
an external script resource) when defining
the html script element. |