org.openmdx.portal.servlet.attribute
Class DateValue

java.lang.Object
  extended by org.openmdx.portal.servlet.attribute.AttributeValue
      extended by org.openmdx.portal.servlet.attribute.DateValue
All Implemented Interfaces:
Serializable

public class DateValue
extends AttributeValue
implements Serializable

See Also:
Serialized Form

Field Summary
static String DATE_FORMAT
           
static String DATETIME_FORMAT
           
 
Fields inherited from class org.openmdx.portal.servlet.attribute.AttributeValue
application, fieldDef, object
 
Constructor Summary
protected DateValue(Object object, FieldDef fieldDef, ApplicationContext application)
           
 
Method Summary
static AttributeValue createDateValue(Object object, FieldDef fieldDef, ApplicationContext application)
           
static String getCalendarFormat(SimpleDateFormat formatter)
           
 Object getDefaultValue()
           
 String getFormat()
           
 SimpleDateFormat getLocalizedDateFormatter()
           
 SimpleDateFormat getLocalizedDateFormatter(boolean useEditStyle)
           
static SimpleDateFormat getLocalizedDateFormatter(String qualifiedFeatureName, boolean useEditStyle, ApplicationContext application)
           
 SimpleDateFormat getLocalizedDateTimeFormatter()
           
 SimpleDateFormat getLocalizedDateTimeFormatter(boolean useEditStyle)
           
static SimpleDateFormat getLocalizedDateTimeFormatter(String qualifiedFeatureName, boolean useEditStyle, ApplicationContext application)
           
protected  String getStringifiedValueInternal(HtmlPage p, Object v, boolean multiLine, boolean forEditing, boolean shortFormat)
          Prepares a single stringified Value to append.
 boolean isDate()
           
 void paint(Attribute attribute, HtmlPage p, String id, String label, org.openmdx.base.accessor.jmi.cci.RefObject_1_0 lookupObject, int nCols, int tabIndex, String gapModifier, String styleModifier, String widthModifier, String rowSpanModifier, String readonlyModifier, String disabledModifier, String lockedModifier, String stringifiedValue, boolean forEditing)
          Paints the attribute to p.
 
Methods inherited from class org.openmdx.portal.servlet.attribute.AttributeValue
createAttributeValue, getAutocompleter, getBackColor, getColor, getDataBinding, getFieldDef, getIconKey, getLabel, getMultiplicity, getName, getObject, getString, getStringifiedValue, getUpperBound, getValue, getValue, getValues, isChangeable, isEnabled, isOptionalValued, isSingleValued, refresh, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DATE_FORMAT

public static final String DATE_FORMAT
See Also:
Constant Field Values

DATETIME_FORMAT

public static final String DATETIME_FORMAT
See Also:
Constant Field Values
Constructor Detail

DateValue

protected DateValue(Object object,
                    FieldDef fieldDef,
                    ApplicationContext application)
Method Detail

createDateValue

public static AttributeValue createDateValue(Object object,
                                             FieldDef fieldDef,
                                             ApplicationContext application)

getLocalizedDateFormatter

public SimpleDateFormat getLocalizedDateFormatter()

getLocalizedDateFormatter

public SimpleDateFormat getLocalizedDateFormatter(boolean useEditStyle)

getLocalizedDateFormatter

public static SimpleDateFormat getLocalizedDateFormatter(String qualifiedFeatureName,
                                                         boolean useEditStyle,
                                                         ApplicationContext application)

getLocalizedDateTimeFormatter

public SimpleDateFormat getLocalizedDateTimeFormatter()

getLocalizedDateTimeFormatter

public SimpleDateFormat getLocalizedDateTimeFormatter(boolean useEditStyle)

getLocalizedDateTimeFormatter

public static SimpleDateFormat getLocalizedDateTimeFormatter(String qualifiedFeatureName,
                                                             boolean useEditStyle,
                                                             ApplicationContext application)

getStringifiedValueInternal

protected String getStringifiedValueInternal(HtmlPage p,
                                             Object v,
                                             boolean multiLine,
                                             boolean forEditing,
                                             boolean shortFormat)
Description copied from class: AttributeValue
Prepares a single stringified Value to append.

Overrides:
getStringifiedValueInternal in class AttributeValue

getDefaultValue

public Object getDefaultValue()
Specified by:
getDefaultValue in class AttributeValue

isDate

public boolean isDate()

getFormat

public String getFormat()

getCalendarFormat

public static String getCalendarFormat(SimpleDateFormat formatter)

paint

public void paint(Attribute attribute,
                  HtmlPage p,
                  String id,
                  String label,
                  org.openmdx.base.accessor.jmi.cci.RefObject_1_0 lookupObject,
                  int nCols,
                  int tabIndex,
                  String gapModifier,
                  String styleModifier,
                  String widthModifier,
                  String rowSpanModifier,
                  String readonlyModifier,
                  String disabledModifier,
                  String lockedModifier,
                  String stringifiedValue,
                  boolean forEditing)
           throws org.openmdx.base.exception.ServiceException
Description copied from class: AttributeValue
Paints the attribute to p.

Overrides:
paint in class AttributeValue
Parameters:
attribute - attribute to paint
p - target page
id - optional id for input fields. null if forEditing==false
label - field label. If null attribute.getLabel() is used as default
lookupObject - base where object lookup starts from. null if forEditing==false
nCols - column span
tabIndex - tab index of generated input field. -1 if forEditing==false
gapModifier - gap modifier before attribute-specific code is generated. null if forEditing==true
styleModifier - style tag for generated element. null if forEditing==true
widthModifier - width tag for generated element. null if forEditing==true
rowSpanModifier - row span modifier
readonlyModifier - readonly modifier. null if forEditing==false
disabledModifier - disabled modifier. null if forEditing==false
lockedModifier - modifier to lock field. null if forEditing==false
stringifiedValue - stringified value of field
forEditing - field is paint in edit mode if true
Throws:
org.openmdx.base.exception.ServiceException


This software is published under the BSD license. Copyright © 2006-2008, OMEX AG, Switzerland, All rights reserved. Use is subject to license terms.