com.iplanet.jato.view.html
Class HREF
java.lang.Object
|
+--com.iplanet.jato.view.ViewBase
|
+--com.iplanet.jato.view.DisplayFieldImpl
|
+--com.iplanet.jato.view.CommandFieldBase
|
+--com.iplanet.jato.view.html.HREF
- All Implemented Interfaces:
- CommandField, DisplayField, HtmlDisplayField, View
- public class HREF
- extends CommandFieldBase
- implements HtmlDisplayField
The HREF encapsulates and implements the server-side representation of an
HTML HREF.
This class controls the HREF specific details of implementing a command objects
ability to automatically pass extra source values out during the display cycle
and map these source values to target objects during the submit cycle.
The extra values are passed as automatically generated name value pairs that are
inserted into the HREF's query string.
- Version:
- JATO/1.2.2 $Id: HREF.java,v 1.17 2002/03/16 03:26:44 todd Exp $
- See Also:
CommandFieldBase
Constructor Summary |
HREF(ContainerView parent,
java.lang.String name,
java.lang.Object value)
Construct a display field with the specified properties. |
HREF(ContainerView parent,
java.lang.String name,
java.lang.String boundName,
java.lang.Object value)
Construct a display field with the specified properties. |
HREF(View parent,
Model model,
java.lang.String name,
java.lang.Object value)
Construct a display field with the specified properties |
HREF(View parent,
Model model,
java.lang.String name,
java.lang.String boundName,
java.lang.Object value)
Construct a display field with the specified properties |
HREF(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 |
java.lang.String |
getExtraHtml()
Returns the string representing any arbitrary "extra HTML" for this field |
static java.lang.String |
getSourceTargetParameterName(int position)
Returns a name appropriate for the HTML representation of an extra value |
protected java.lang.Object |
getSourceValue(CommandSourceTargetPair nextPair,
int position)
Returns a source value for a given CommandSourceTargetPair . |
void |
setExtraHtml(java.lang.String value)
Supplies a string representing any arbitrary "extra HTML" which will be
appended to the standard HTML generated by this field. |
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HREF
public HREF(ContainerView parent,
java.lang.String name,
java.lang.Object value)
- Construct a display field with the specified properties. The field
will be bound to the parent's default model.
- Parameters:
parent
- The parent view of this objectname
- This view's name and model field bound namevalue
- This DiplayField's initial value.
HREF
public HREF(ContainerView parent,
java.lang.String name,
java.lang.String boundName,
java.lang.Object value)
- Construct a display field with the specified properties. The field
will be bound to the parent's default model.
- Parameters:
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.
HREF
public HREF(View parent,
Model model,
java.lang.String name,
java.lang.Object value)
- Construct a display field with the specified properties
- Parameters:
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.
HREF
public HREF(View parent,
Model model,
java.lang.String name,
java.lang.String boundName,
java.lang.Object value)
- Construct a display field with the specified properties
- Parameters:
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.
HREF
public HREF(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
- Parameters:
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
- This DisplayField's DisplayFieldDescriptor. May be null.
getExtraHtml
public java.lang.String getExtraHtml()
- Returns the string representing any arbitrary "extra HTML" for this field
- Specified by:
getExtraHtml
in interface HtmlDisplayField
- Returns:
- the extra HTML string
setExtraHtml
public void setExtraHtml(java.lang.String value)
- Supplies a string representing any arbitrary "extra HTML" which will be
appended to the standard HTML generated by this field.
- Parameters:
value
- The arbitrary string of "extra HTML".
getSourceValue
protected java.lang.Object getSourceValue(CommandSourceTargetPair nextPair,
int position)
- Returns a source value for a given
CommandSourceTargetPair
.
This method is automatically called as part
of the submit cycle.
- Overrides:
getSourceValue
in class CommandFieldBase
- Parameters:
nextPair
- The CommandSourceTargetPair
whose source value is
being retrievedposition
- The position of the CommandSourceTargetPair
within
the list of CommandSourceTargetPairs
.- Returns:
- The value corresponding to the source member of the
CommandSourceTargetPair
getSourceTargetParameterName
public static java.lang.String getSourceTargetParameterName(int position)
- Returns a name appropriate for the HTML representation of an extra value
- Returns:
- The name that will be assigned to the extra value for its
HTML representation