org.melati.template
Class SimpleDateAdaptor

Package class diagram package SimpleDateAdaptor
java.lang.Object
  extended by org.melati.template.SimpleDateAdaptor
All Implemented Interfaces:
TempletAdaptor

public class SimpleDateAdaptor
extends Object
implements TempletAdaptor

A SimpleDateAdaptor is used to format a date field into a dd/mm/yyyy format for display. It also adapts the input (given in dd/mm/yyyy or yyyyMMdd) back to a java.sql.Date.


Field Summary
static SimpleDateAdaptor it
          The instance.
 
Constructor Summary
SimpleDateAdaptor()
           
 
Method Summary
 Object rawFrom(ServletTemplateContext context, String fieldName)
          Retrieve a raw value, ie an SQL value, from a ServletTemplateContext.
 String rendered(Field dateField)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

it

public static final SimpleDateAdaptor it
The instance.

Constructor Detail

SimpleDateAdaptor

public SimpleDateAdaptor()
Method Detail

rawFrom

public Object rawFrom(ServletTemplateContext context,
                      String fieldName)
Retrieve a raw value, ie an SQL value, from a ServletTemplateContext.

Specified by:
rawFrom in interface TempletAdaptor
Parameters:
context - the ServletTemplateContext the value is stored in
fieldName - the name of the field in the context
Returns:
the raw value
See Also:
rawFrom(org.melati.template.ServletTemplateContext, java.lang.String)

rendered

public String rendered(Field dateField)
Parameters:
dateField - the input Field
Returns:
the rendered String


Copyright © 2000-2010 PanEris. All Rights Reserved.