|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.tapestry.form.validator.BaseValidator
public abstract class BaseValidator
Abstract implementation of Validator.
| Constructor Summary | |
|---|---|
BaseValidator()
|
|
BaseValidator(String initializer)
|
|
| Method Summary | |
|---|---|
void |
accumulateProfileProperty(IFormComponent field,
JSONObject profile,
String key,
Object property)
Utility method to store a field specific profile property which can later be used by client side validation. |
void |
accumulateProperty(JSONObject profile,
String key,
Object value)
Utility used to append onto an existing property represented as an object array. |
boolean |
getAcceptsNull()
Returns false. |
Translator |
getFieldTranslator(IFormComponent field,
Class clazz)
Used to grab the corresponding Translator for
the field, if one exists. |
String |
getMessage()
|
boolean |
isRequired()
Returns false. |
void |
renderContribution(IMarkupWriter writer,
IRequestCycle cycle,
FormComponentContributorContext context,
IFormComponent field)
Does nothing. |
void |
setMessage(String message)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.tapestry.form.validator.Validator |
|---|
validate |
| Constructor Detail |
|---|
public BaseValidator()
public BaseValidator(String initializer)
| Method Detail |
|---|
public String getMessage()
public void setMessage(String message)
public boolean getAcceptsNull()
getAcceptsNull in interface Validator
public void renderContribution(IMarkupWriter writer,
IRequestCycle cycle,
FormComponentContributorContext context,
IFormComponent field)
renderContribution in interface FormComponentContributorwriter - allows contributor to write additional attributes into the component's tagcycle - for accessing request informationcontext - utilities for genering messages and client-side validationfield - the field for which contributions are being renderedpublic boolean isRequired()
isRequired in interface Validator
public void accumulateProfileProperty(IFormComponent field,
JSONObject profile,
String key,
Object property)
field - The field to store the property for, will key off of IFormComponent.getClientId().profile - The profile for the form.key - The property key to store.property - The property to store.
public void accumulateProperty(JSONObject profile,
String key,
Object value)
profile - key - value -
public Translator getFieldTranslator(IFormComponent field,
Class clazz)
Translator for
the field, if one exists.
field -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||