| java.lang.Object com.salmonllc.html.HtmlComponent com.salmonllc.html.HtmlValidatorText
HtmlValidatorText | public class HtmlValidatorText extends HtmlComponent implements SubmitListener,ValueChangedListener(Code) | | This is a special type of text component used in conjunction with the
HtmlComponentValidator to perform validations and display an error message.
|
Method Summary | |
public void | addErrorMessage(String msg) | public void | addErrorMessage(String msg, HtmlFormComponent comp) | public void | addErrorMessage(String msg, HtmlFormComponent comp, int row) | public void | addErrorMessage(String msg, HtmlFormComponent comp, int row, float seq) Adds an error message to the list for one request
Parameters: msg - The message to add Parameters: comp - The component to set focus to Parameters: row - The row in the datastore to scroll to/set focus to. | public void | addExpressionRule(String expression, String errorMessage, String localizationKey, HtmlFormComponent focusComp) Use this method to add validation rules that will be checked by the
validator.
Parameters: expression - A boolean expression that will trigger an error if evaluatedto false. Parameters: errorMessage - The error message to display if the validation fails. | public void | addExpressionRule(String expression, String errorMessage, HtmlFormComponent focusComp) Use this method to add validation rules that will be checked by the
validator.
Parameters: expression - A boolean expression that will trigger an error if evaluatedto false. Parameters: errorMessage - The error message to display if the validation fails. | public void | addExpressionRule(DataStoreExpression expression, String errorMessage, String localizationKey, HtmlFormComponent focusComp) Use this method to add validation rules that will be checked by the
validator.
Parameters: errorMessage - The error message to display if the validation fails. | public void | addExpressionRule(DataStoreExpression expression, String errorMessage, HtmlFormComponent focusComp) Use this method to add validation rules that will be checked by the
validator.
Parameters: expression - A DataStoreExpression class that returns a boolean value. | public void | addJavascriptRule(String javascript, String errorMessage, String localizationKey, HtmlFormComponent focusComp) Adds a javascript rule to the validator. | public void | addJavascriptRule(String javascript, String errorMessage, HtmlFormComponent focusComp) Adds a javascript rule to the validator. | public void | addLookupRule(String lookupTable, String searchExpression, String errorMessage, String localizationKey, HtmlFormComponent focusComp) Use this method to add validation rules that will be checked via a lookup
to another table.
Parameters: lookupTable - The name of the table to lookup the value against. Parameters: searchExpression - A DataStoreEvaluator expression that returns a String and willbe used as the where clause for the SQL that will validate thedata. Parameters: errorMessage - The error message to display if the validation fails. | public void | addLookupRule(String lookupTable, String searchExpression, String errorMessage, HtmlFormComponent focusComp) Use this method to add validation rules that will be checked via a lookup
to another table.
Parameters: lookupTable - The name of the table to lookup the value against. Parameters: searchExpression - A DataStoreEvaluator expression that returns a String and willbe used as the where clause for the SQL that will validate thedata. Parameters: errorMessage - The error message to display if the validation fails. | public void | addLookupRule(String lookupTable, String searchExpression, String errorMessage, String localizationKey, HtmlFormComponent focusComp, String descColumn, String descBucket) Use this method to add validation rules that will be checked via a lookup
to another table. | public void | addLookupRule(String lookupTable, String searchExpression, String errorMessage, HtmlFormComponent focusComp, String descColumn, String descBucket) Use this method to add validation rules that will be checked via a lookup
to another table. | public void | addLookupRule(String lookupTable, DataStoreExpression searchExpression, String errorMessage, String localizationKey, HtmlFormComponent focusComp) Use this method to add validation rules that will be checked via a lookup
to another table.
Parameters: lookupTable - The name of the table to lookup the value against. Parameters: searchExpression - A DataStoreExpression that returns a String and will be usedas the where clause for the SQL that will validate the data. Parameters: errorMessage - The error message to display if the validation fails. | public void | addLookupRule(String lookupTable, DataStoreExpression searchExpression, String errorMessage, HtmlFormComponent focusComp) Use this method to add validation rules that will be checked via a lookup
to another table.
Parameters: lookupTable - The name of the table to lookup the value against. Parameters: searchExpression - A DataStoreExpression that returns a String and will be usedas the where clause for the SQL that will validate the data. Parameters: errorMessage - The error message to display if the validation fails. | public void | addLookupRule(String lookupTable, DataStoreExpression searchExpression, String errorMessage, String localizationKey, HtmlFormComponent focusComp, String descColumn, String descBucket) Use this method to add validation rules that will be checked via a lookup
to another table. | public void | addLookupRule(String lookupTable, DataStoreExpression searchExpression, String errorMessage, HtmlFormComponent focusComp, String descColumn, String descBucket) Use this method to add validation rules that will be checked via a lookup
to another table. | public void | addRangeRule(Object minValue, Object maxValue, String errorMessage, String localizationKey, HtmlFormComponent focusComp) Use this method to add a range validation rule.
Parameters: minValue - The minimum value the component must meet or null for nominimum Parameters: maxValue - The maximum value the component must meet or null for nomaximum Parameters: errorMessage - The error message to display if the validation fails. | public void | addRangeRule(Object minValue, Object maxValue, String errorMessage, HtmlFormComponent focusComp) Use this method to add a range validation rule.
Parameters: minValue - The minimum value the component must meet or null for nominimum Parameters: maxValue - The maximum value the component must meet or null for nomaximum Parameters: errorMessage - The error message to display if the validation fails. | public void | addRegularExpressionRule(String regExp, String errorMessage, String localizationKey, HtmlFormComponent focusComp) Adds a javascript rule to the validator. | public void | addRegularExpressionRule(String regExp, String errorMessage, HtmlFormComponent focusComp) Adds a regular expression rule to the validator. | public void | addRequiredRule(HtmlFormComponent focusComp, String errorMessage, String localizationKey) Adds a required rule to the validator. | public void | addRequiredRule(HtmlFormComponent focusComp, String errorMessage) Adds a required rule to the validator. | public void | addSubmitToListenTo(HtmlSubmitButton b) Adds an HtmlSubmitButton to this component. | public void | addSubmitToListenTo(HtmlLink b) Adds an HtmlLink to this component. | public void | addSubmitToListenTo(JspLink b) Adds an JspLink to this component. | public void | addSubmitToListenTo(HtmlSubmitImage b) Adds an HtmlSubmitImage to this component. | public void | addTypeCheckRule(HtmlFormComponent comp, String errorMessage, String localizationKey) Adds a type check rule to the validator. | public void | addTypeCheckRule(HtmlFormComponent comp, String errorMessage) Adds a type check rule to the validator. | public void | addValidateListener(ValidateListener l) This method adds a listener the will be notified when after the scripted
validations complete. | public void | autoPopulateLookups() | public boolean | executeEvent(int eventType) | public void | generateHTML(PrintWriter p, int rowNo) | public static String | generateOnClickJavaScriptForButtons(String onClickCode, Vector submitListeners, String componentFullName) For javascript validations, this method generates the javascript function
that will fire when a sumbit button is clicked. | public static String | generateOnClickJavaScriptFunctionName(String componentFullName) For javascript validations, this method generates the name of the on
click function used for submit buttons. | public boolean | getAddFocusLinksToErrors() | public int | getBreaksAfter() Returns the number of line breaks to generate after the error text is
displayed. | public int | getBreaksBefore() Returns the number of line breaks to generate before the error text is
displayed. | public int | getBreaksBetween() | public String | getDBProfile() | public DataStoreBuffer | getDataStore() | public HtmlFormComponent | getErrorComponent(int index) | public int | getErrorCount() | public String | getErrorMessage(int index) | public int | getErrorRow(int index) | public boolean | getFixSpecialHtmlCharacters() Returns whether special html characters ( <,>,&,; etc..) should be
converted to Html Escape Sequences before being generated. | public String | getFont() | public boolean | getMultipleErrorsOK() | public boolean | getUseAlertsForErrors() | public boolean | getUseJavaScript() | public boolean | getUseJavaScriptForRangeRules() | public boolean | getUseJavaScriptForRegularExpRules() | public boolean | getUseJavaScriptForRequiredRules() | public boolean | getValidateNewRows() | public boolean | getValidationSucceeded() | public void | importRules(DataStoreBuffer ds) | public void | initialize() This method is called when the component is created from a Jsp validator
tag after all the fields are initialized. | public boolean | isErrorOnLastPass() | public boolean | isInDataTableHeaderOrFooter(HtmlComponent comp) | public void | populateDescriptions() Use this method to fill in the descriptions for lookup columns for the
current row in the datastore. | public void | populateDescriptions(int rowNo) Use this method to fill in the descriptions for lookup columns. | public boolean | processParms(Hashtable parms, int rowNo) | public void | setAddFocusLinksToErrors(boolean b) | public void | setAutoPopulateLookups(boolean autoPopulateLookups) Sets the autoPopulateLookups flag. | public void | setBreaksAfter(int breaksAfter) Sets the number of line breaks to generate after the error text is
displayed. | public void | setBreaksBefore(int breaksBefore) Sets the number of line breaks to generate before the error text is
displayed. | public void | setBreaksBetween(int breaksBetween) | public void | setDBProfile(String dbProfile) | public void | setDataStore(DataStoreBuffer ds) Sets the DataStore validated by the validator. | public void | setErrorMessage(String msg) | public void | setErrorMessage(String msg, HtmlFormComponent comp, int row, HtmlComponent extraDisplay) | public void | setErrorMessage(String msg, HtmlFormComponent comp, int row) | public void | setErrorMessage(String msg, HtmlFormComponent comp) | public void | setFixSpecialHtmlCharacters(boolean fix) Specify whether special html characters ( <,>,&,; etc..) should be
converted to Html Escape Sequences before being generated. | public void | setFont(String font) Sets the error message will display in. | public void | setMultipleErrorsOK(boolean multipleErrors) | public void | setSkipRowExpression(String exp) | public void | setSkipRowExpression(DataStoreExpression exp) | public void | setTheme(String theme) This method sets the property theme for the component. | public void | setUseAlertsForErrors(boolean b) | public void | setUseJavaScript(boolean b) | public void | setUseJavaScriptForRangeRules(boolean b) | public void | setUseJavaScriptForRegularExpRules(boolean b) | public void | setUseJavaScriptForRequiredRules(boolean b) | public void | setUseJavaScriptForValidationsOnly(boolean b) Sets whether or not to use javascript only for validation, by default
validates on both client and server. | public void | setValidateNewRows(boolean validateNewRows) | public boolean | submitPerformed(SubmitEvent e) This method implements the SubmitListener interface and is used for the
internal operation of the component. | public boolean | valueChanged(ValueChangedEvent e) This method implements the ValueChangedListener interface and is used for
the internal operation of the component. |
addErrorMessage | public void addErrorMessage(String msg)(Code) | | Adds an error message to the list for one request
|
addErrorMessage | public void addErrorMessage(String msg, HtmlFormComponent comp)(Code) | | Adds an error message to the list for one request
Parameters: msg - The message to add Parameters: comp - The component to set focus to |
addErrorMessage | public void addErrorMessage(String msg, HtmlFormComponent comp, int row)(Code) | | Adds an error message to the list for one request
Parameters: msg - The message to add Parameters: comp - The component to set focus to Parameters: row - The row in the datastore to scroll to/set focus to |
addErrorMessage | public void addErrorMessage(String msg, HtmlFormComponent comp, int row, float seq)(Code) | | Adds an error message to the list for one request
Parameters: msg - The message to add Parameters: comp - The component to set focus to Parameters: row - The row in the datastore to scroll to/set focus to. Use -1 forthe current row. Parameters: seq - The position that the error should be displayed if there aremultiple errors. Errors generated by rules have an sequencecorresponding to the order that the rule was added (1.0, 2.0,etc). Your errors can be inserted into the list by specifyinga number that falls in the middle of any two rules. |
addExpressionRule | public void addExpressionRule(String expression, String errorMessage, String localizationKey, HtmlFormComponent focusComp) throws DataStoreException(Code) | | Use this method to add validation rules that will be checked by the
validator.
Parameters: expression - A boolean expression that will trigger an error if evaluatedto false. Parameters: errorMessage - The error message to display if the validation fails. It canhave a %VALUE% token embedded in it to include the value ofthe column in error in the message Parameters: localizationKey - For internationalization, the key value used to look up theerror message for the usesr language (may be null) Parameters: focusComp - The HtmlComponent to set focus too if the error expressionreturns false. |
addExpressionRule | public void addExpressionRule(String expression, String errorMessage, HtmlFormComponent focusComp) throws DataStoreException(Code) | | Use this method to add validation rules that will be checked by the
validator.
Parameters: expression - A boolean expression that will trigger an error if evaluatedto false. Parameters: errorMessage - The error message to display if the validation fails. It canhave a %VALUE% token embedded in it to include the value ofthe column in error in the message Parameters: focusComp - The HtmlComponent to set focus too if the error expressionreturns false. |
addExpressionRule | public void addExpressionRule(DataStoreExpression expression, String errorMessage, String localizationKey, HtmlFormComponent focusComp) throws DataStoreException(Code) | | Use this method to add validation rules that will be checked by the
validator.
Parameters: errorMessage - The error message to display if the validation fails. It canhave a %VALUE% token embedded in it to include the value ofthe column in error in the message Parameters: localizationKey - For internationalization, the key value used to look up theerror message for the usesr language (may be null) Parameters: focusComp - The HtmlComponent to set focus too if the error expressionreturns false. |
addExpressionRule | public void addExpressionRule(DataStoreExpression expression, String errorMessage, HtmlFormComponent focusComp) throws DataStoreException(Code) | | Use this method to add validation rules that will be checked by the
validator.
Parameters: expression - A DataStoreExpression class that returns a boolean value. Itwill trigger an error if the value returns false. Parameters: errorMessage - The error message to display if the validation fails. It canhave a %VALUE% token embedded in it to include the value ofthe column in error in the message Parameters: focusComp - The HtmlComponent to set focus too if the error expressionreturns false. |
addJavascriptRule | public void addJavascriptRule(String javascript, String errorMessage, String localizationKey, HtmlFormComponent focusComp) throws DataStoreException(Code) | | Adds a javascript rule to the validator. The rule can be any javascript
that returns a boolean value (true means the validation succeeded and
false means it failed). This rule is only executed on the client browser
and only if the validator is set to use javascript.
Parameters: javascript - A boolean javascript expression. If the expression returnsfalse it will trigger an error Parameters: focusComp - The component to check Parameters: errorMessage - The error message to display if the validation fails Parameters: localizationKey - For internationalization, the key value used to look up theerror message for the usesr language (may be null) |
addJavascriptRule | public void addJavascriptRule(String javascript, String errorMessage, HtmlFormComponent focusComp) throws DataStoreException(Code) | | Adds a javascript rule to the validator. The rule can be any javascript
that returns a boolean value (true means the validation succeeded and
false means it failed). This rule is only executed on the client browser
and only if the validator is set to use javascript.
Parameters: javascript - A boolean javascript expression. If the expression returnsfalse it will trigger an error Parameters: focusComp - The component to check Parameters: errorMessage - The error message to display if the validation fails Parameters: localizationKey - For internationalization, the key value used to look up theerror message for the usesr language (may be null) |
addLookupRule | public void addLookupRule(String lookupTable, String searchExpression, String errorMessage, String localizationKey, HtmlFormComponent focusComp) throws DataStoreException(Code) | | Use this method to add validation rules that will be checked via a lookup
to another table.
Parameters: lookupTable - The name of the table to lookup the value against. Parameters: searchExpression - A DataStoreEvaluator expression that returns a String and willbe used as the where clause for the SQL that will validate thedata. Parameters: errorMessage - The error message to display if the validation fails. It canhave a %VALUE% token embedded in it to include the value ofthe column in error in the message Parameters: localizationKey - For internationalization, the key value used to look up theerror message for the usesr language (may be null) Parameters: focusComp - The HtmlComponent to set focus to if the error expressionreturns false. |
addLookupRule | public void addLookupRule(String lookupTable, String searchExpression, String errorMessage, HtmlFormComponent focusComp) throws DataStoreException(Code) | | Use this method to add validation rules that will be checked via a lookup
to another table.
Parameters: lookupTable - The name of the table to lookup the value against. Parameters: searchExpression - A DataStoreEvaluator expression that returns a String and willbe used as the where clause for the SQL that will validate thedata. Parameters: errorMessage - The error message to display if the validation fails. It canhave a %VALUE% token embedded in it to include the value ofthe column in error in the message Parameters: focusComp - The HtmlComponent to set focus to if the error expressionreturns false. |
addLookupRule | public void addLookupRule(String lookupTable, String searchExpression, String errorMessage, String localizationKey, HtmlFormComponent focusComp, String descColumn, String descBucket) throws DataStoreException(Code) | | Use this method to add validation rules that will be checked via a lookup
to another table. In addition to checking if a set of columns are valid,
this type of rule will also fill in a bucket in the datastore with a
description taken from the row retrieved in the lookup table.
Parameters: lookupTable - The name of the table to lookup the value against. Parameters: searchExpression - A DataStoreEvaluator expression that returns a String and willbe used as the where clause for the SQL that will validate thedata. Parameters: errorMessage - The error message to display if the validation fails. It canhave a %VALUE% token embedded in it to include the value ofthe column in error in the message Parameters: localizationKey - For internationalization, the key value used to look up theerror message for the usesr language (may be null) Parameters: focusComp - The HtmlComponent to set focus to if the error expressionreturns false. Parameters: descColumn - The name of the column in the lookup table used to fill in thedescription. Parameters: descBucket - The name of a bucket column in the datastore to place thedescription. |
addLookupRule | public void addLookupRule(String lookupTable, String searchExpression, String errorMessage, HtmlFormComponent focusComp, String descColumn, String descBucket) throws DataStoreException(Code) | | Use this method to add validation rules that will be checked via a lookup
to another table. In addition to checking if a set of columns are valid,
this type of rule will also fill in a bucket in the datastore with a
description taken from the row retrieved in the lookup table.
Parameters: lookupTable - The name of the table to lookup the value against. Parameters: searchExpression - A DataStoreEvaluator expression that returns a String and willbe used as the where clause for the SQL that will validate thedata. Parameters: errorMessage - The error message to display if the validation fails. It canhave a %VALUE% token embedded in it to include the value ofthe column in error in the message Parameters: focusComp - The HtmlComponent to set focus to if the error expressionreturns false. Parameters: descColumn - The name of the column in the lookup table used to fill in thedescription. Parameters: descBucket - The name of a bucket column in the datastore to place thedescription. |
addLookupRule | public void addLookupRule(String lookupTable, DataStoreExpression searchExpression, String errorMessage, String localizationKey, HtmlFormComponent focusComp) throws DataStoreException(Code) | | Use this method to add validation rules that will be checked via a lookup
to another table.
Parameters: lookupTable - The name of the table to lookup the value against. Parameters: searchExpression - A DataStoreExpression that returns a String and will be usedas the where clause for the SQL that will validate the data. Parameters: errorMessage - The error message to display if the validation fails. It canhave a %VALUE% token embedded in it to include the value ofthe column in error in the message Parameters: localizationKey - For internationalization, the key value used to look up theerror message for the usesr language (may be null) Parameters: focusComp - The HtmlComponent to set focus to if the error expressionreturns false. |
addLookupRule | public void addLookupRule(String lookupTable, DataStoreExpression searchExpression, String errorMessage, HtmlFormComponent focusComp) throws DataStoreException(Code) | | Use this method to add validation rules that will be checked via a lookup
to another table.
Parameters: lookupTable - The name of the table to lookup the value against. Parameters: searchExpression - A DataStoreExpression that returns a String and will be usedas the where clause for the SQL that will validate the data. Parameters: errorMessage - The error message to display if the validation fails. It canhave a %VALUE% token embedded in it to include the value ofthe column in error in the message Parameters: focusComp - The HtmlComponent to set focus to if the error expressionreturns false. |
addLookupRule | public void addLookupRule(String lookupTable, DataStoreExpression searchExpression, String errorMessage, String localizationKey, HtmlFormComponent focusComp, String descColumn, String descBucket) throws DataStoreException(Code) | | Use this method to add validation rules that will be checked via a lookup
to another table. In addition to checking if a set of columns are valid,
this type of rule will also fill in a bucket in the datastore with a
description taken from the row retrieved in the lookup table.
Parameters: lookupTable - The name of the table to lookup the value against. Parameters: searchExpression - A DataStoreExpression that returns a String and will be usedas the where clause for the SQL that will validate the data. Parameters: errorMessage - The error message to display if the validation fails. It canhave a %VALUE% token embedded in it to include the value ofthe column in error in the message Parameters: localizationKey - For internationalization, the key value used to look up theerror message for the usesr language (may be null) Parameters: focusComp - The HtmlComponent to set focus to if the error expressionreturns false. Parameters: descColumn - The name of the column in the lookup table used to fill in thedescription. Parameters: descBucket - The name of a bucket column in the datastore to place thedescription. |
addLookupRule | public void addLookupRule(String lookupTable, DataStoreExpression searchExpression, String errorMessage, HtmlFormComponent focusComp, String descColumn, String descBucket) throws DataStoreException(Code) | | Use this method to add validation rules that will be checked via a lookup
to another table. In addition to checking if a set of columns are valid,
this type of rule will also fill in a bucket in the datastore with a
description taken from the row retrieved in the lookup table.
Parameters: lookupTable - The name of the table to lookup the value against. Parameters: searchExpression - A DataStoreExpression that returns a String and will be usedas the where clause for the SQL that will validate the data. Parameters: errorMessage - The error message to display if the validation fails. It canhave a %VALUE% token embedded in it to include the value ofthe column in error in the message Parameters: focusComp - The HtmlComponent to set focus to if the error expressionreturns false. Parameters: descColumn - The name of the column in the lookup table used to fill in thedescription. Parameters: descBucket - The name of a bucket column in the datastore to place thedescription. |
addRangeRule | public void addRangeRule(Object minValue, Object maxValue, String errorMessage, String localizationKey, HtmlFormComponent focusComp) throws DataStoreException(Code) | | Use this method to add a range validation rule.
Parameters: minValue - The minimum value the component must meet or null for nominimum Parameters: maxValue - The maximum value the component must meet or null for nomaximum Parameters: errorMessage - The error message to display if the validation fails. It canhave a %VALUE% token embedded in it to include the value ofthe column in error in the message Parameters: localizationKey - For internationalization, the key value used to look up theerror message for the usesr language (may be null) Parameters: focusComp - The HtmlComponent to set focus too if the error expressionreturns false. |
addRangeRule | public void addRangeRule(Object minValue, Object maxValue, String errorMessage, HtmlFormComponent focusComp) throws DataStoreException(Code) | | Use this method to add a range validation rule.
Parameters: minValue - The minimum value the component must meet or null for nominimum Parameters: maxValue - The maximum value the component must meet or null for nomaximum Parameters: errorMessage - The error message to display if the validation fails. It canhave a %VALUE% token embedded in it to include the value ofthe column in error in the message Parameters: focusComp - The HtmlComponent to set focus too if the error expressionreturns false. |
addRegularExpressionRule | public void addRegularExpressionRule(String regExp, String errorMessage, String localizationKey, HtmlFormComponent focusComp) throws DataStoreException(Code) | | Adds a javascript rule to the validator. The rule can be any javascript
that returns a boolean value (true means the validation succeeded and
false means it failed). This rule is only executed on the client browser
and only if the validator is set to use javascript.
Parameters: regExp - A regular expression. The expression needs to match the columnin the datastore or the rule will be violated Parameters: focusComp - The component to check Parameters: errorMessage - The error message to display if the validation fails Parameters: localizationKey - For internationalization, the key value used to look up theerror message for the usesr language (may be null) |
addRegularExpressionRule | public void addRegularExpressionRule(String regExp, String errorMessage, HtmlFormComponent focusComp) throws DataStoreException(Code) | | Adds a regular expression rule to the validator. The rule can be any
javascript that returns a boolean value (true means the validation
succeeded and false means it failed). This rule is only executed on the
client browser and only if the validator is set to use javascript.
Parameters: regExp - A regular expression. The expression needs to match the columnin the datastore or the rule will be violated Parameters: focusComp - The component to check Parameters: errorMessage - The error message to display if the validation fails |
addRequiredRule | public void addRequiredRule(HtmlFormComponent focusComp, String errorMessage, String localizationKey) throws DataStoreException(Code) | | Adds a required rule to the validator. This makes sure that the value in
the component is entered by the user
Parameters: focusComp - The component to check Parameters: errorMessage - The error message to display if the validation fails Parameters: localizationKey - For internationalization, the key value used to look up theerror message for the usesr language (may be null) |
addRequiredRule | public void addRequiredRule(HtmlFormComponent focusComp, String errorMessage) throws DataStoreException(Code) | | Adds a required rule to the validator. This makes sure that the value in
the component is entered by the user
Parameters: focusComp - The component to check Parameters: errorMessage - The error message to display if the validation fails Parameters: localizationKey - For internationalization, the key value used to look up theerror message for the usesr language (may be null) |
addSubmitToListenTo | public void addSubmitToListenTo(HtmlSubmitButton b)(Code) | | Adds an HtmlSubmitButton to this component. The validation will fire when
the submit button is clicked.
|
addSubmitToListenTo | public void addSubmitToListenTo(HtmlLink b)(Code) | | Adds an HtmlLink to this component. The validation will fire when the
link is clicked.
|
addSubmitToListenTo | public void addSubmitToListenTo(JspLink b)(Code) | | Adds an JspLink to this component. The validation will fire when the link
is clicked.
|
addSubmitToListenTo | public void addSubmitToListenTo(HtmlSubmitImage b)(Code) | | Adds an HtmlSubmitImage to this component. The validation will fire when
the submit image is clicked.
|
addTypeCheckRule | public void addTypeCheckRule(HtmlFormComponent comp, String errorMessage, String localizationKey) throws DataStoreException(Code) | | Adds a type check rule to the validator. This makes sure that the value
in the component is the correct type for the datastore column it is bound
to.
Parameters: comp - The component to check Parameters: errorMessage - The error message to display if the validation fails. It canhave a %VALUE% token embedded in it to include the value ofthe column in error in the message Parameters: localizationKey - For internationalization, the key value used to look up theerror message for the usesr language (may be null) |
addTypeCheckRule | public void addTypeCheckRule(HtmlFormComponent comp, String errorMessage) throws DataStoreException(Code) | | Adds a type check rule to the validator. This makes sure that the value
in the component is the correct type for the datastore column it is bound
to.
Parameters: comp - The component to check Parameters: errorMessage - The error message to display if the validation fails |
addValidateListener | public void addValidateListener(ValidateListener l)(Code) | | This method adds a listener the will be notified when after the scripted
validations complete.
Parameters: l - The listener to add. |
autoPopulateLookups | public void autoPopulateLookups() throws Exception(Code) | | If autopopulate is true, it will populate all the description columns for
the datastore, otherwise it won't do anything
|
generateOnClickJavaScriptForButtons | public static String generateOnClickJavaScriptForButtons(String onClickCode, Vector submitListeners, String componentFullName)(Code) | | For javascript validations, this method generates the javascript function
that will fire when a sumbit button is clicked. This is used by the
framework and generally does not need to be called directly.
|
generateOnClickJavaScriptFunctionName | public static String generateOnClickJavaScriptFunctionName(String componentFullName)(Code) | | For javascript validations, this method generates the name of the on
click function used for submit buttons. This is used by the framework and
generally does not need to be called directly.
|
getAddFocusLinksToErrors | public boolean getAddFocusLinksToErrors()(Code) | | Returns whether or not error messages contain links that set focus to a
field when clicked on
|
getBreaksAfter | public int getBreaksAfter()(Code) | | Returns the number of line breaks to generate after the error text is
displayed.
int |
getBreaksBefore | public int getBreaksBefore()(Code) | | Returns the number of line breaks to generate before the error text is
displayed.
int |
getBreaksBetween | public int getBreaksBetween()(Code) | | Returns the number of line breaks between error messages if multiple are
displayed
int |
getDBProfile | public String getDBProfile()(Code) | | Gets the database profile used for lookup validations
String |
getDataStore | public DataStoreBuffer getDataStore()(Code) | | Returns the DataStore validated by the validator
DataStore |
getErrorComponent | public HtmlFormComponent getErrorComponent(int index)(Code) | | Returns the error component at the specified index
|
getErrorCount | public int getErrorCount()(Code) | | Returns the number of errors found in the validator
|
getErrorMessage | public String getErrorMessage(int index)(Code) | | Returns the error message at the specified index
|
getErrorRow | public int getErrorRow(int index)(Code) | | Returns the error row at the specified index
|
getFixSpecialHtmlCharacters | public boolean getFixSpecialHtmlCharacters()(Code) | | Returns whether special html characters ( <,>,&,; etc..) should be
converted to Html Escape Sequences before being generated.
|
getFont | public String getFont()(Code) | | Returns the Font used to display the error message
String |
getMultipleErrorsOK | public boolean getMultipleErrorsOK()(Code) | | Gets whether or not the validator will display multiple errors
|
getUseAlertsForErrors | public boolean getUseAlertsForErrors()(Code) | | |
getUseJavaScript | public boolean getUseJavaScript()(Code) | | true if the component will use client side javascript forvalidations where that is possible |
getUseJavaScriptForRangeRules | public boolean getUseJavaScriptForRangeRules()(Code) | | Returns whether or not to use javascript for range rules
|
getUseJavaScriptForRegularExpRules | public boolean getUseJavaScriptForRegularExpRules()(Code) | | Returns whether or not to use javascript for regular expression rules
|
getUseJavaScriptForRequiredRules | public boolean getUseJavaScriptForRequiredRules()(Code) | | Sets whether or not to use javascript for required rules
|
getValidateNewRows | public boolean getValidateNewRows()(Code) | | Returns the a value indicating whether or not new rows in the datastore
that haven't been modified get validated
boolean |
getValidationSucceeded | public boolean getValidationSucceeded()(Code) | | Returns a boolean value indicating whether or not the validation
succeeded
|
importRules | public void importRules(DataStoreBuffer ds)(Code) | | Imports any validation rules described in the datastore into the
validator
|
initialize | public void initialize()(Code) | | This method is called when the component is created from a Jsp validator
tag after all the fields are initialized. It is a convenient place for
sub classesto override to initialize the component.
|
isErrorOnLastPass | public boolean isErrorOnLastPass()(Code) | | true if the last time the validator displayed there were errorsin it |
isInDataTableHeaderOrFooter | public boolean isInDataTableHeaderOrFooter(HtmlComponent comp)(Code) | | true if component is in a datatable header or footer. |
populateDescriptions | public void populateDescriptions() throws Exception(Code) | | Use this method to fill in the descriptions for lookup columns for the
current row in the datastore.
|
populateDescriptions | public void populateDescriptions(int rowNo) throws Exception(Code) | | Use this method to fill in the descriptions for lookup columns.
Parameters: rowNo - The row number in the DataStore to fill in. |
setAddFocusLinksToErrors | public void setAddFocusLinksToErrors(boolean b)(Code) | | Sets whether or not error messages contain links that set focus to a
field when clicked on
|
setAutoPopulateLookups | public void setAutoPopulateLookups(boolean autoPopulateLookups)(Code) | | Sets the autoPopulateLookups flag. This indicates whether or not the
component will automatically populate lookup descriptions after it's
datasource get autoretreieved
Parameters: autoPopulateLookups - The autoPopulateLookups to set |
setBreaksAfter | public void setBreaksAfter(int breaksAfter)(Code) | | Sets the number of line breaks to generate after the error text is
displayed.
|
setBreaksBefore | public void setBreaksBefore(int breaksBefore)(Code) | | Sets the number of line breaks to generate before the error text is
displayed.
|
setBreaksBetween | public void setBreaksBetween(int breaksBetween)(Code) | | Sets the number of line breaks between error messages if multiple are
displayed
|
setDBProfile | public void setDBProfile(String dbProfile)(Code) | | Sets the database profile used for lookup validations
|
setDataStore | public void setDataStore(DataStoreBuffer ds)(Code) | | Sets the DataStore validated by the validator.
|
setErrorMessage | public void setErrorMessage(String msg)(Code) | | Removes all other messages and adds this one to the list for one request
|
setErrorMessage | public void setErrorMessage(String msg, HtmlFormComponent comp, int row, HtmlComponent extraDisplay)(Code) | | Removes all other messages and adds this one to the list for one request
Parameters: msg - The message to add Parameters: comp - The component to set focus to Parameters: row - The row in the datastore to scroll to/set focus to Parameters: extraDisplay - An extra HTML component to display next to the error message |
setErrorMessage | public void setErrorMessage(String msg, HtmlFormComponent comp, int row)(Code) | | Removes all other messages and adds this one to the list for one request
Parameters: msg - The message to add Parameters: comp - The component to set focus to Parameters: row - The row in the datastore to scroll to/set focus to |
setErrorMessage | public void setErrorMessage(String msg, HtmlFormComponent comp)(Code) | | Removes all other messages and adds this one to the list for one request
Parameters: msg - The message to add Parameters: comp - The component to set focus to |
setFixSpecialHtmlCharacters | public void setFixSpecialHtmlCharacters(boolean fix)(Code) | | Specify whether special html characters ( <,>,&,; etc..) should be
converted to Html Escape Sequences before being generated.
|
setFont | public void setFont(String font)(Code) | | Sets the error message will display in.
|
setMultipleErrorsOK | public void setMultipleErrorsOK(boolean multipleErrors)(Code) | | Sets whether or not the validator will display multiple errors
|
setSkipRowExpression | public void setSkipRowExpression(String exp) throws DataStoreException(Code) | | Sets an expression that will cause a row to be skipped (not be validated)
if it evaluates to true
|
setTheme | public void setTheme(String theme)(Code) | | This method sets the property theme for the component.
Parameters: theme - The theme to use. |
setUseAlertsForErrors | public void setUseAlertsForErrors(boolean b)(Code) | | Set to true if the component will use javascript alert popups to display
errors
|
setUseJavaScript | public void setUseJavaScript(boolean b)(Code) | | Enables or disables the use of javascript for all rule types
|
setUseJavaScriptForRangeRules | public void setUseJavaScriptForRangeRules(boolean b)(Code) | | Sets whether or not to use javascript for range rules
|
setUseJavaScriptForRegularExpRules | public void setUseJavaScriptForRegularExpRules(boolean b)(Code) | | Sets whether or not to use javascript for regular expression rules
|
setUseJavaScriptForRequiredRules | public void setUseJavaScriptForRequiredRules(boolean b)(Code) | | Sets whether or not to use javascript for required rules
|
setUseJavaScriptForValidationsOnly | public void setUseJavaScriptForValidationsOnly(boolean b)(Code) | | Sets whether or not to use javascript only for validation, by default
validates on both client and server.
|
setValidateNewRows | public void setValidateNewRows(boolean validateNewRows)(Code) | | Sets the a value indicating whether or not new rows in the datastore that
haven't been modified get validated
Parameters: validateNewRows - The validateNewRows to set |
submitPerformed | public boolean submitPerformed(SubmitEvent e) throws Exception(Code) | | This method implements the SubmitListener interface and is used for the
internal operation of the component. It should not be called directly
|
valueChanged | public boolean valueChanged(ValueChangedEvent e) throws Exception(Code) | | This method implements the ValueChangedListener interface and is used for
the internal operation of the component. It should not be called directly
|
|
|