| java.lang.Object com.sun.rave.web.ui.validator.StringLengthValidator
StringLengthValidator | public class StringLengthValidator implements Validator,StateHolder(Code) | | Use this validator to check the number of characters in a string when
you need to set the validation messages.
author: avk |
Method Summary | |
public String | getTooLongMessage() Get the message to be used if the string is longer than the maxmimum number of characters. | public String | getTooShortMessage() Get the message to be used if the string is shorter than the minimum number of characters. | public boolean | isTransient() Returns false, this component needs to save state. | public void | restoreState(FacesContext context, Object state) Restore the state of the component. | public Object | saveState(FacesContext context) | public void | setTooLongMessage(String tooLongMessage) Set the message to be used if the string is longer than the maximum number of characters. | public void | setTooShortMessage(String tooShortMessage) Set the message to be used if the string is shorter than the minimum number of characters. | public void | setTransient(boolean transientValue) | public void | validate(FacesContext context, UIComponent component, Object value) |
VALIDATOR_ID | final public static String VALIDATOR_ID(Code) | | The converter id for this converter.
|
StringLengthValidator | public StringLengthValidator()(Code) | | Creates a new instance of StringLengthValidator
|
StringLengthValidator | public StringLengthValidator(int max)(Code) | | Creates a new instance of StringLengthValidator.
Parameters: max - The maximum number of characters allowed in the string |
StringLengthValidator | public StringLengthValidator(int max, int min)(Code) | | Creates a new instance of StringLengthValidator.
Parameters: max - The maximum number of characters allowed in the string Parameters: min - The minimum number of characters allowed in the string |
getTooLongMessage | public String getTooLongMessage()(Code) | | Get the message to be used if the string is longer than the maxmimum number of characters.
the message to be used if the string is longer than the maxmimum number of characters |
getTooShortMessage | public String getTooShortMessage()(Code) | | Get the message to be used if the string is shorter than the minimum number of characters.
the message to be used if the string is shorter than the minimum number of characters |
isTransient | public boolean isTransient()(Code) | | Returns false, this component needs to save state.
false |
restoreState | public void restoreState(FacesContext context, Object state)(Code) | | Restore the state of the component.
Parameters: context - The FacesContext Parameters: state - the Object representing the state of the component |
saveState | public Object saveState(FacesContext context)(Code) | | Saves the state of the component into an object
Parameters: context - the FacesContext the Object representing the state of the component |
setTooLongMessage | public void setTooLongMessage(String tooLongMessage)(Code) | | Set the message to be used if the string is longer than the maximum number of characters.
Parameters: tooLongMessage - the message to be used if the string is longer than the maxmimum number of characters |
setTooShortMessage | public void setTooShortMessage(String tooShortMessage)(Code) | | Set the message to be used if the string is shorter than the minimum number of characters.
Parameters: tooShortMessage - the message to be used if the string is shorter than the minimum number of characters |
setTransient | public void setTransient(boolean transientValue)(Code) | | Does nothing
|
validate | public void validate(FacesContext context, UIComponent component, Object value) throws ValidatorException(Code) | | Validate the value with regard to a UIComponent and a
FacesContext .
Parameters: context - The FacesContext Parameters: component - The component to be validated Parameters: value - The submitted value of the component exception: ValidatorException - if the value is not valid |
|
|