|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface FieldTranslator<T>
A wrapper around Translator
that combines the translator for a specific Field
and (sometimes) an override of the default validation message (used when an input value
can't be parsed).
Method Summary | |
---|---|
Class<T> |
getType()
Returns the type of the server-side value. |
T |
parse(String input)
Invoked after the client-submitted value has been translated to check that the value conforms
to expectations (often, in terms of minimum or maximum value). |
void |
render(MarkupWriter writer)
Invokes Translator.render(Field, String, MarkupWriter,org.apache.tapestry5.services.FormSupport) . |
String |
toClient(T value)
Converts a server-side value to a client-side string. |
Method Detail |
---|
Class<T> getType()
T parse(String input) throws ValidationException
translated
to check that the value conforms
to expectations (often, in terms of minimum or maximum value). If and only if the value is approved by all
Validators is the value applied by the field.
ValidationException
- if the value violates the constraintString toClient(T value)
value
- the server side value (which will not be null)
Translator.toClient(Object)
void render(MarkupWriter writer)
Translator.render(Field, String, MarkupWriter,org.apache.tapestry5.services.FormSupport)
. This is
called at a point "inside" the tag, so that additional attributes may be added. In many cases, the underlying
Validator
may write client-side JavaScript to enforce the constraint as well.
writer
- markup writer to direct output to.MarkupWriter.attributes(Object[])
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |