org.equanda.tapestry5.translators
Class BooleanTranslator

java.lang.Object
  extended by org.equanda.tapestry5.translators.BooleanTranslator
All Implemented Interfaces:
org.apache.tapestry5.Translator<Boolean>

public class BooleanTranslator
extends Object
implements org.apache.tapestry5.Translator<Boolean>

Tapestry translator for boolean values

Author:
Vladimir Tkachenko

Constructor Summary
BooleanTranslator()
           
 
Method Summary
 Class<Boolean> getType()
           
 Boolean parseClient(String clientValue, org.apache.tapestry5.ioc.Messages messages)
          Parses the client value to a boolean
 String toClient(Boolean value)
          Converts null to the false, 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

BooleanTranslator

public BooleanTranslator()
Method Detail

parseClient

public Boolean parseClient(String clientValue,
                           org.apache.tapestry5.ioc.Messages messages)
                    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.Translator<Boolean>

getType

public Class<Boolean> getType()
Specified by:
getType in interface org.apache.tapestry5.Translator<Boolean>


Copyright © 2007-2008. All Rights Reserved.