Class StringTranslator
- java.lang.Object
-
- org.apache.tapestry5.internal.translator.AbstractTranslator<String>
-
- org.apache.tapestry5.internal.translator.StringTranslator
-
- All Implemented Interfaces:
Translator<String>
public class StringTranslator extends AbstractTranslator<String>
-
-
Constructor Summary
Constructors Constructor Description StringTranslator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.-
Methods inherited from class org.apache.tapestry5.internal.translator.AbstractTranslator
getMessageKey, getName, getType
-
-
-
-
Constructor Detail
-
StringTranslator
public StringTranslator()
-
-
Method Detail
-
render
public void render(Field field, String message, MarkupWriter writer, FormSupport formSupport)
Does nothing.- Parameters:
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 JavaScript
-
parseClient
public String parseClient(Field field, String clientValue, String message) throws ValidationException
Passes the clientValue through unchanged.- Parameters:
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 override- Returns:
- equivalent server-side value (possibly null)
- Throws:
ValidationException
- if the value can not be parsed
-
-