org.equanda.tapestry5.translators
Class BooleanTranslator
java.lang.Object
org.equanda.tapestry5.translators.BooleanTranslator
- All Implemented Interfaces:
- org.apache.tapestry5.FieldTranslator<Boolean>, org.apache.tapestry5.Translator<Boolean>
public class BooleanTranslator
- extends Object
- implements org.apache.tapestry5.Translator<Boolean>, org.apache.tapestry5.FieldTranslator<Boolean>
Tapestry translator for boolean values
- Author:
- Vladimir Tkachenko, Joachim Van der Auwera
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BooleanTranslator
public BooleanTranslator()
parseClient
public Boolean parseClient(org.apache.tapestry5.Field field,
String clientValue,
String message)
throws org.apache.tapestry5.ValidationException
- Parses the client value to a boolean
- Specified by:
parseClient
in interface org.apache.tapestry5.Translator<Boolean>
- Throws:
org.apache.tapestry5.ValidationException
- if the clientValue can not be parsed
toClient
public String toClient(Boolean value)
- Converts null to the false, non-null to a string representation.
- Specified by:
toClient
in interface org.apache.tapestry5.FieldTranslator<Boolean>
- Specified by:
toClient
in interface org.apache.tapestry5.Translator<Boolean>
getType
public Class<Boolean> getType()
- Specified by:
getType
in interface org.apache.tapestry5.FieldTranslator<Boolean>
- Specified by:
getType
in interface org.apache.tapestry5.Translator<Boolean>
getName
public String getName()
- Specified by:
getName
in interface org.apache.tapestry5.Translator<Boolean>
getMessageKey
public String getMessageKey()
- Specified by:
getMessageKey
in interface org.apache.tapestry5.Translator<Boolean>
render
public void render(org.apache.tapestry5.Field field,
String message,
org.apache.tapestry5.MarkupWriter markupWriter,
org.apache.tapestry5.services.FormSupport formSupport)
- Specified by:
render
in interface org.apache.tapestry5.Translator<Boolean>
parse
public Boolean parse(String clientValue)
throws org.apache.tapestry5.ValidationException
- Specified by:
parse
in interface org.apache.tapestry5.FieldTranslator<Boolean>
- Throws:
org.apache.tapestry5.ValidationException
render
public void render(org.apache.tapestry5.MarkupWriter markupWriter)
- Specified by:
render
in interface org.apache.tapestry5.FieldTranslator<Boolean>
Copyright © 2007-2009. All Rights Reserved.