|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.tapestry.internal.translator.IntegerTranslator
public final class IntegerTranslator
A translator for type integer.
| Constructor Summary | |
|---|---|
IntegerTranslator()
|
|
| Method Summary | |
|---|---|
Class<Integer> |
getType()
Returns the type of the server-side value. |
Integer |
parseClient(String clientValue,
Messages messages)
Parses blank values to null, otherwise parses the client value to an integer. |
String |
toClient(Integer value)
Converts null to the blank string, non-null to a string representation. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IntegerTranslator()
| Method Detail |
|---|
public Class<Integer> getType()
Translator
getType in interface Translator<Integer>
public Integer parseClient(String clientValue,
Messages messages)
throws ValidationException
parseClient in interface Translator<Integer>clientValue - to convert to a server value; this will not be null, but may be blankmessages - validator messages assembled by ValidationMessagesSource
ValidationException - if the clientValue can not be parsed as an integerpublic String toClient(Integer value)
toClient in interface Translator<Integer>value - the server side value (which will not be null)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||