public class StringTranslator extends AbstractTranslator<String>
| Constructor and Description |
|---|
StringTranslator() |
| Modifier and Type | Method and Description |
|---|---|
String |
parseClient(Field field,
String clientValue,
String message)
Passes the clientValue through unchanged.
|
void |
render(Field field,
String message,
MarkupWriter writer,
FormSupport formSupport)
Does nothing.
|
String |
toClient(String value)
Passes the value through unchanged.
|
getMessageKey, getName, getTypepublic StringTranslator()
public void render(Field field, String message, MarkupWriter writer, FormSupport formSupport)
field - the field which is currently being renderedmessage - formatted validation message, either from validation messages, or from an overridewriter - markup writer, allowing additional attributes to be written into the active elementformSupport - used to add JavaScriptpublic String parseClient(Field field, String clientValue, String message) throws ValidationException
field - for which a value is being parsedclientValue - to convert to a server value; this will not be null, but may be blankmessage - formatted validation message, either from validation messages, or from an overrideValidationException - if the value can not be parsed5.6.4 - Copyright © 2003-2021 The Apache Software Foundation.