HATS 7.5.1 Web API Reference

Publicly accessible methods not documented here are for IBM internal use only and may change in a future release of the product.

com.ibm.hats.transform.widgets
Class DropdownWidget

java.lang.Object
  extended by com.ibm.hats.transform.widgets.Widget
      extended by com.ibm.hats.transform.widgets.DropdownWidget
All Implemented Interfaces:
IContextDependent, ICustomPropertySupplier, HTMLRenderer, com.ibm.hats.transform.renderers.TextRenderer
Direct Known Subclasses:
ListWidget

public class DropdownWidget
extends Widget
implements HTMLRenderer, IContextDependent

DropdownWidget renders a HTML select elements. It takes InputComponentElements as input.

See Also:
InputComponentElement

Field Summary
static String CLASS_NAME
           
static Properties defaults
          Default settings for this Widget.
protected  boolean displayAsList
           
protected  HTMLElementFactory htmlElementFactory
           
static boolean isScreenReversed
           
static String PROPERTY_AUTO_SUBMIT_ON_SELECT
           
static String PROPERTY_AUTOSUBMITKEY
           
static String PROPERTY_CAPTION_VARIABLE
           
static String PROPERTY_LIST_ITEMS
           
static String PROPERTY_SHARED_GVS
           
static String PROPERTY_SHOW_SUBMIT
           
static String PROPERTY_SIZE
           
static String PROPERTY_SOURCE_HINTS
           
static String PROPERTY_SOURCE_STRING
           
static String PROPERTY_SOURCE_VARIABLE
           
static String PROPERTY_SUBMIT_BUTTON_CAPTION
           
static String PROPERTY_VALUE_VARIABLE
           
static int stringListItemsCount
           
 
Fields inherited from class com.ibm.hats.transform.widgets.Widget
componentElements, contextAttributes, settings
 
Fields inherited from interface com.ibm.hats.common.ICustomPropertySupplier
CLASSNAME
 
Constructor Summary
DropdownWidget(ComponentElement[] componentElements, Properties settings)
          Class constructor.
 
Method Summary
static ComponentElementList createListItems(String defaultValue, Properties settings, Hashtable globalVariables, ComponentElementList hints)
          Convenience method for creating a ComponentElementList from three different sources based on the widget settings.
 StringBuffer drawHTML()
          Converts ComponentElements into HTML output for embedding within a Transformation page
 Vector getCustomProperties(int iPageNumber, Properties properties, ResourceBundle bundle)
          Returns a list of this object's custom properties.
 Vector getCustomPropertiesBiDi(int iPageNumber, Properties properties, ResourceBundle bundle)
           
 Properties getDefaultValues(int iPageNumber)
          Returns this object's default property values.
 int getPropertyPageCount()
          Returns the number of property pages associated with this object.
static int getStringListItemsCount()
           
 boolean isAllowed(ContextAttributes contextAttributes)
          Gets whether or not this object should be visible in the studio given some context attributes.
 boolean isPropertyAllowed(String name, ContextAttributes contextAttributes)
          Gets whether or not the specified property should be visible in the component or widget settings.
static int parseInt(String intStr)
           
protected  boolean renderTable()
          Decides whether or not a table should be used in the rendering based on the componentElements.
static void setStringListItemsCount(int count)
           
 
Methods inherited from class com.ibm.hats.transform.widgets.Widget
convertBidi, draw, getComponentElements, getContextAttribute, getContextAttributes, getCustomComposite, getSettings, insertAlign, insertDir, newInstance, setComponentElements, setContextAttribute, setContextAttributes, setSettings
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_NAME

public static final String CLASS_NAME

htmlElementFactory

protected HTMLElementFactory htmlElementFactory

PROPERTY_SOURCE_VARIABLE

public static final String PROPERTY_SOURCE_VARIABLE
See Also:
Constant Field Values

PROPERTY_VALUE_VARIABLE

public static final String PROPERTY_VALUE_VARIABLE
See Also:
Constant Field Values

PROPERTY_CAPTION_VARIABLE

public static final String PROPERTY_CAPTION_VARIABLE
See Also:
Constant Field Values

PROPERTY_SOURCE_STRING

public static final String PROPERTY_SOURCE_STRING
See Also:
Constant Field Values

PROPERTY_SOURCE_HINTS

public static final String PROPERTY_SOURCE_HINTS
See Also:
Constant Field Values

PROPERTY_LIST_ITEMS

public static final String PROPERTY_LIST_ITEMS
See Also:
Constant Field Values

PROPERTY_SHARED_GVS

public static final String PROPERTY_SHARED_GVS
See Also:
Constant Field Values

PROPERTY_SIZE

public static final String PROPERTY_SIZE
See Also:
Constant Field Values

PROPERTY_AUTOSUBMITKEY

public static final String PROPERTY_AUTOSUBMITKEY
See Also:
Constant Field Values

PROPERTY_AUTO_SUBMIT_ON_SELECT

public static final String PROPERTY_AUTO_SUBMIT_ON_SELECT
See Also:
Constant Field Values

PROPERTY_SHOW_SUBMIT

public static final String PROPERTY_SHOW_SUBMIT
See Also:
Constant Field Values

PROPERTY_SUBMIT_BUTTON_CAPTION

public static final String PROPERTY_SUBMIT_BUTTON_CAPTION
See Also:
Constant Field Values

stringListItemsCount

public static int stringListItemsCount

defaults

public static Properties defaults
Default settings for this Widget.


displayAsList

protected boolean displayAsList

isScreenReversed

public static boolean isScreenReversed
Constructor Detail

DropdownWidget

public DropdownWidget(ComponentElement[] componentElements,
                      Properties settings)
Class constructor.

Parameters:
componentElements - An array of component elements.
settings - The Properties settings.
See Also:
Widget.Widget(ComponentElement[], Properties)
Method Detail

renderTable

protected boolean renderTable()
Decides whether or not a table should be used in the rendering based on the componentElements.


drawHTML

public StringBuffer drawHTML()
Description copied from interface: HTMLRenderer
Converts ComponentElements into HTML output for embedding within a Transformation page

Specified by:
drawHTML in interface HTMLRenderer
Returns:
HTML output

getStringListItemsCount

public static int getStringListItemsCount()

setStringListItemsCount

public static void setStringListItemsCount(int count)

createListItems

public static ComponentElementList createListItems(String defaultValue,
                                                   Properties settings,
                                                   Hashtable globalVariables,
                                                   ComponentElementList hints)
Convenience method for creating a ComponentElementList from three different sources based on the widget settings. Sources include user specified items, specified indexed global variables, and hints from the component. Currently used by DropdownWidget, RadioButtonWidget, and PopupWidget.

Parameters:
defaultValue - default item value in the list, generally taken from the current value of the field
settings - the widget's settings
globalVariables - current global variables, shared or local, you decide
hints - hints from the component, or null if none exist
Returns:
list of items

getPropertyPageCount

public int getPropertyPageCount()
Description copied from interface: ICustomPropertySupplier
Returns the number of property pages associated with this object.

Note: Currently only 0 or 1 pages are supported.

Specified by:
getPropertyPageCount in interface ICustomPropertySupplier
Overrides:
getPropertyPageCount in class Widget
Returns:
the number of defined property pages used to configure this object, or 0 if there are none

getDefaultValues

public Properties getDefaultValues(int iPageNumber)
Description copied from interface: ICustomPropertySupplier
Returns this object's default property values.

Specified by:
getDefaultValues in interface ICustomPropertySupplier
Overrides:
getDefaultValues in class Widget
Parameters:
iPageNumber - page for which to retrieve default properties
Returns:
object's default properties

getCustomPropertiesBiDi

public Vector getCustomPropertiesBiDi(int iPageNumber,
                                      Properties properties,
                                      ResourceBundle bundle)
Overrides:
getCustomPropertiesBiDi in class Widget

getCustomProperties

public Vector getCustomProperties(int iPageNumber,
                                  Properties properties,
                                  ResourceBundle bundle)
Description copied from interface: ICustomPropertySupplier
Returns a list of this object's custom properties. Items must be of type com.ibm.hats.common.HCustomProperty.

Specified by:
getCustomProperties in interface ICustomPropertySupplier
Overrides:
getCustomProperties in class Widget
Parameters:
iPageNumber - page number containing desired properties
properties - existing values for properties defined here
bundle - ResourceBundle containing NLS descriptions for the properties
Returns:
Vector containing all the custom properties for this object, or null if there are none
See Also:
HCustomProperty

isPropertyAllowed

public boolean isPropertyAllowed(String name,
                                 ContextAttributes contextAttributes)
Description copied from interface: IContextDependent
Gets whether or not the specified property should be visible in the component or widget settings. The context attributes may contain the Component name when this is called on a Widget, or whether or not we are presenting this Component/Widget choice while configuring Default Rendering.

Specified by:
isPropertyAllowed in interface IContextDependent
Parameters:
name - property name
Returns:
whether or not this property is allowed in the specified context

isAllowed

public boolean isAllowed(ContextAttributes contextAttributes)
Description copied from interface: IContextDependent
Gets whether or not this object should be visible in the studio given some context attributes. The context attributes may contain the Component name when this is called on a Widget, or whether or not we are presenting this Component/Widget choice while configuring Default Rendering.

Specified by:
isAllowed in interface IContextDependent
Returns:
whether or not this Component or Widget is allowed in the specified context

parseInt

public static int parseInt(String intStr)

HATS 7.5.1 (201005110649)