com.dynamide.datatypes
Class ExpandableDatatype
java.lang.Object
com.dynamide.DynamideObject
com.dynamide.datatypes.Datatype
com.dynamide.datatypes.ExpandableDatatype
- All Implemented Interfaces:
- IGet
- Direct Known Subclasses:
- Caption, Link, ServerSideEvent, Version, WidgetDatatype
public abstract class ExpandableDatatype
- extends Datatype
The Widget class calls DynamideObject.expand(String) to expand all properties, but that doesn't dig into
enumerated types or complex types that contain multiple attributes, so this subclass calls the expansion
whenever its get(String) method is called. For example, the com.dynamide.datatypes.Link class is an
ExpandableDatatype, and it has attributes "key", "href", and "text". These need to be expanded, since
they support calls such as get("href"). Simply relying on get("value") won't work. However, StringDatatype does not
descend from ExpandableDatatype since it has a simple value that will already be expanded by the Widget class.
If you write Datatype descendants that have multiple attributes or are contained by EnumeratedDatatype, then
subclass this class. com.dynamide.datatypes.StringDatatype can be contained in an enumeration but will not
be expanded, so if you want macros to expand in your enumerated property, use com.dynamide.datatypes.Caption
instead. The expansion does not handle internationionalization replacements, that is handled through the session.
Each datatype publishes it's "DotName", which for complex types includes the "key" attribute. The full DotName is
looked up and expanded, regardless of the superclass.
The expansions allow you to store any webmacro directives, variable lookups, and escape sequences in the
stored property values. You must escape any #, $ or \ characters.
Method Summary |
java.lang.Object |
get(java.lang.String what)
Subclasses can override this. |
Methods inherited from class com.dynamide.datatypes.Datatype |
addXMLContentTo, clone, createClone, dump, dumpHTML, finalize, getAsStored, getDatatypeClassName, getDatatypeClassName, getDatatypeClassName, getDatatypeInstance, getProperty, getSession, init, insertItemDatatype, set, setProperty, setSession, validate |
Methods inherited from class com.dynamide.DynamideObject |
clearProfiler, dump, expand, findParentExpander, findParentPage, findParentSession, findTopParentPage, getCategoryID, getDotName, getID, getNextGetter, getObjectID, getOwner, getProfiler, isDebugEnabled, isInfoEnabled, logDebug, logDebug, logDebug, logDebug, logError, logError, logError, logError, logInfo, logInfo, logInfo, logInfo, logWarn, logWarn, logWarn, logWarn, popLogContext, printf, printProfiler, profileEnter, profileLeave, pushLogContext, setDotName, setID, setNextGetter, setObjectID, setOwner, sprintf, useProfiler, walkParents |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExpandableDatatype
public ExpandableDatatype()
ExpandableDatatype
public ExpandableDatatype(DynamideObject owner,
Session session)
get
public java.lang.Object get(java.lang.String what)
- Description copied from class:
DynamideObject
- Subclasses can override this.
- Specified by:
get
in interface IGet
- Overrides:
get
in class Datatype
Copyright © 2001-2013 DYNAMIDE.COM. All Rights Reserved.