|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.iplanet.jato.view.ViewBase | +--com.iplanet.jato.view.DisplayFieldImpl | +--com.iplanet.jato.view.CommandFieldBase
Basic implementation of the CommandField
interface. This class
provides application developers with the ability to associate a Command
object with the field via the field's descriptor (and instance of
CommandFieldDescriptor
). The runtime infrastructure will
automatically invoke the associated command whenever the client activates
the field. If no command is explicitly associated with the field, a default
standard command will be invoked and the request dispatched to a request
invocation event handler.
This class also provides the ability to pass values between sources and
targets as defined in a list of CommandSourceTargetPairs
. The
CommandSourceTargetPairs
which this object is responsible for
supporting are specified in this object's descriptor. The manner in which
the source values are mapped accross request boundaries is specific to
derived classes.
This class also supports the ability to pass arbitrary name value pairs called "extra values" along with the standard display content of this field. These arbitrary name value pais need not be specified in the descriptor, nor are they formally affiliated with a designated target. These arbitrary extra values are simply included in the generated display content, and thereby made available for retrieval in the subsequent submit as ordinary request parameters.
Fields inherited from interface com.iplanet.jato.view.View |
QUALIFIED_VIEW_NAME_SEPARATOR |
Constructor Summary | |
|
CommandFieldBase(ContainerView parent,
java.lang.String name,
java.lang.Object value)
Construct a display field with the specified properties. |
|
CommandFieldBase(ContainerView parent,
java.lang.String name,
java.lang.String boundName,
java.lang.Object value)
Construct a display field with the specified properties. |
|
CommandFieldBase(View parent,
Model model,
java.lang.String name,
java.lang.Object value)
Construct a display field with the specified properties |
protected |
CommandFieldBase(View parent,
Model model,
java.lang.String name,
java.lang.String boundName,
CommandFieldDescriptor descriptor)
Construct a display field with the specified properties |
|
CommandFieldBase(View parent,
Model model,
java.lang.String name,
java.lang.String boundName,
java.lang.Object value)
Construct a display field with the specified properties |
|
CommandFieldBase(View parent,
Model model,
java.lang.String name,
java.lang.String boundName,
java.lang.Object value,
CommandFieldDescriptor descriptor)
Construct a display field with the specified properties |
Method Summary | |
void |
addExtraValue(java.lang.String name,
java.lang.String value)
Adds a name value pair to this object's extra value map. |
void |
beforeCommand(CommandEvent event)
Invoked before the request handling command is invoked as notification that this field was activated. |
void |
clearExtraValues()
Removes all name value pairs from this object's extra value map. |
CommandFieldDescriptor |
getCommandFieldDescriptor()
Return the descriptor associate with this field. |
protected DisplayField |
getDisplayField(ContainerView rootView,
java.lang.String[] namePath)
This method takes an arbitrarily deep namePath (e.g. |
java.util.Map |
getExtraValuesMap()
Returns a Map object which specifies the Name Value Pairs that this object will automatically append to its generated content. |
protected abstract java.lang.Object |
getSourceValue(CommandSourceTargetPair pair,
int position)
Returns a source value for a given CommandSourceTargetPair . |
void |
mapSourceTargetNVPs()
Deprecated. This method is no longer needed and it currently has no implementation. Developers can safely omit calls to this method. |
protected void |
mapSourceTargetValues()
Iterates through the list of CommandSourceTargetPairs and
sets each target member's value to its corresponding source value. |
void |
removeExtraValue(java.lang.String name)
Removes a name value pair from this object's extra value map. |
void |
setExtraValuesMap(java.util.Map value)
Sets this objects extra value map. |
Methods inherited from class com.iplanet.jato.view.DisplayFieldImpl |
getBoundName, getDescriptor, getModel, getValue, getValues, setBoundName, setDescriptor, setModel, setValue, setValue, setValues, setValues, stringValue |
Methods inherited from class com.iplanet.jato.view.ViewBase |
getName, getParent, getParentViewBean, getQualifiedName, getRootView, getRootView, setName, setParent |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.iplanet.jato.view.DisplayField |
getDescriptor, getValue, getValues, setValue, setValues, stringValue |
Methods inherited from interface com.iplanet.jato.view.View |
getName, getParent, getQualifiedName, setParent |
Constructor Detail |
public CommandFieldBase(ContainerView parent, java.lang.String name, java.lang.Object value)
parent
- The parent view of this objectname
- This view's name and model field bound namevalue
- This DiplayField's initial value.public CommandFieldBase(ContainerView parent, java.lang.String name, java.lang.String boundName, java.lang.Object value)
parent
- The parent view of this objectname
- This view's nameboundName
- The name of the model field to which this DisplayField is boundvalue
- This DiplayField's initial value.public CommandFieldBase(View parent, Model model, java.lang.String name, java.lang.Object value)
parent
- The parent view of this objectmodel
- The model to which this DisplayField is boundname
- This view's name and model field bound namevalue
- This DiplayField's initial value.protected CommandFieldBase(View parent, Model model, java.lang.String name, java.lang.String boundName, CommandFieldDescriptor descriptor)
parent
- The parent view of this objectmodel
- The model to which this DisplayField is boundname
- This view's name.boundName
- The name of the model field to which this DisplayField is boundvalue
- This DiplayField's initial value.descriptor
- The CommandFieldDescriptor. This value may be null for those
instances which do not which do not require the features
enabled by the use of CommandFieldDescriptor
.public CommandFieldBase(View parent, Model model, java.lang.String name, java.lang.String boundName, java.lang.Object value)
parent
- The parent view of this objectmodel
- The model to which this DisplayField is boundname
- This view's name.boundName
- The name of the model field to which this DisplayField is boundvalue
- This DiplayField's initial value.public CommandFieldBase(View parent, Model model, java.lang.String name, java.lang.String boundName, java.lang.Object value, CommandFieldDescriptor descriptor)
parent
- The parent view of this objectmodel
- The model to which this DisplayField is boundname
- This view's name.boundName
- The name of the model field to which this DisplayField is boundvalue
- This DiplayField's initial value.descriptor
- The CommandFieldDescriptor. This value may be null for those
instances which do not which do not require the features
enabled by the use of CommandFieldDescriptor
.Method Detail |
public CommandFieldDescriptor getCommandFieldDescriptor()
CommandDescriptor
class, an
instance of which may actually be contained by this descriptor.getCommandFieldDescriptor
in interface CommandField
public void beforeCommand(CommandEvent event)
CommandField
implementations and who
override this method should always call the superclass version of this
event to ensure consistent behavior.beforeCommand
in interface CommandField
public java.util.Map getExtraValuesMap()
getExtraValuesMap
in interface CommandField
public void setExtraValuesMap(java.util.Map value)
value
- The map that will be assigned to this object.public void addExtraValue(java.lang.String name, java.lang.String value)
name
- The name member of the name value pairvalue
- The value member of the name value pairpublic void removeExtraValue(java.lang.String name)
name
- The name member of the name value pair to be removedpublic void clearExtraValues()
public void mapSourceTargetNVPs()
protected void mapSourceTargetValues()
CommandSourceTargetPairs
and
sets each target member's value to its corresponding source value. This
method completes the behaviorial cycle of the CommandSourceTargetPairs
.protected DisplayField getDisplayField(ContainerView rootView, java.lang.String[] namePath)
rootView
- The ConteinerView object which corresponds to the first object in the
namePath (i.e. the outermost container view)namePath
- An arbitrarily deep namePath (e.g. "Page1.Repeated2.Foo" ) which
describes the containment relationship of a display field to its
container viewsprotected abstract java.lang.Object getSourceValue(CommandSourceTargetPair pair, int position)
CommandSourceTargetPair
.
This method is automatically called as part of the submit cycle.pair
- The CommandSourceTargetPair
whose source value is
being retrievedposition
- The position of the CommandSourceTargetPair
within
the list of CommandSourceTargetPairs
.CommandSourceTargetPair
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |