org.melati.template
Class SimpleDateAdaptor
java.lang.Object
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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
it
public static final SimpleDateAdaptor it
- The instance.
SimpleDateAdaptor
public SimpleDateAdaptor()
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 infieldName
- 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.