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

Fields inherited from interface com.iplanet.jato.view.html.HtmlDisplayField
QBE_CONTROL_NAME_SUFFIX
 
Fields inherited from interface com.iplanet.jato.view.View
QUALIFIED_VIEW_NAME_SEPARATOR
 
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.CommandFieldBase
addExtraValue, beforeCommand, clearExtraValues, getCommandFieldDescriptor, getDisplayField, getExtraValuesMap, mapSourceTargetNVPs, mapSourceTargetValues, removeExtraValue, setExtraValuesMap
 
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

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 object
name - This view's name and model field bound name
value - 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 object
name - This view's name
boundName - The name of the model field to which this DisplayField is bound
value - 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 object
model - The model to which this DisplayField is bound
name - This view's name and model field bound name
value - 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 object
model - The model to which this DisplayField is bound
name - This view's name.
boundName - The name of the model field to which this DisplayField is bound
value - 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 object
model - The model to which this DisplayField is bound
name - This view's name.
boundName - The name of the model field to which this DisplayField is bound
value - This DiplayField's initial value.
descriptor - This DisplayField's DisplayFieldDescriptor. May be null.
Method Detail

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 retrieved
position - 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