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.html
Class HTMLElementFactory

java.lang.Object
  extended by com.ibm.hats.transform.html.HTMLElementFactory

public class HTMLElementFactory
extends Object

HTMLElementFactory is the preferred method for constructing HTMLElements for use by the Widgets. This class consists of a set of creation methods which take component elements as arguments, and properly configure HTMLElements which are tied back to host screen data in name and in javascript function.

HTMLElementFactory maintains a hash of keys to CSS class names for assigning CSS classes to HTMLElements automatically. The LINK_CLASS, INPUT_CLASS, etc static String fields are used as the keys into this hash. The CSS mapping can be automatically generated from the widgetSettings using HTMLWidgetUtilities. Alternately, the hash can be populated manually.

Finally, the HTMLElementFactory maintains a String of style overrides which will be applied to all HTMLElements produced.

Example of rendering a list of component elements:

 HTMLElementFactory factory = HTMLElementFactory.newInstance(contextAttributes,widgetSettings);
 factory.setCSSMapping(HTMLWidgetUtilities.processCSSOverrides(widgetSettings));
 factory.setStyleOverrides("backgroundColor:green;");
 //alternately
 //factory.getCSSMapping.put(INPUT_CLASS,"MyCSSInputClass");
 for (int i = 0; i < componentElements.length; i++) {
     InputComponentElement ice = (InputComponentElement)componentElements[i];
         //create and render the html input field's caption
     HTMLWidgetUtilities.renderCaption(ice.getCaption(), factory, buffer);
     //create the html input field from the input component element, then render it
         TextInputElement input = factory.createTextInput(ice);
         input.render(buffer);
         //insert a line break
         buffer.append("<br>");
 }
 

See Also:
HTMLElement, HTMLRenderer, HTMLWidgetUtilities

Field Summary
static String BUTTON_CLASS
          CSS class mapping key to be used for HTML input buttons
static String CHECKBOX_CLASS
          CSS class mapping key to be used for HTML checkboxes
static String CLASSNAME
           
protected  ContextAttributes contextAttributes
          The factory's associated context attributes.
static String DESCRIPTION_CLASS
          CSS class mapping key to be used for HTML radio button descriptions
static String IMGLINK_CLASS
          CSS class mapping key to be used for a popup launcher element
static String INPUT_CLASS
          CSS class mapping key to be used for HTML text input elements
static String ITEMLINK_CLASS
          CSS class mapping key to be used for popup item elements
static String LABEL_CLASS
          CSS class mapping key to be used for assigning a class to a caption
static String LINK_CLASS
          CSS class mapping key to be used for HTML A element
static String OPTION_CLASS
          CSS class mapping key to be used for HTML option elements
static String POPUP_CLASS
          CSS class mapping key to be used for a popup DIV element
static String POPUP_TABLE_CLASS
          CSS class mapping key to be used for HTML table in a popup
static String POPUP_TD_CLASS
          CSS class mapping key to be used for HTML table in a popup
static String POPUP_TH_CLASS
          CSS class mapping key to be used for HTML table in a popup
static String POPUP_TR_CLASS
          CSS class mapping key to be used for HTML table in a popup
static String RADIOBUTTON_CLASS
          CSS class mapping key to be used for HTML input radio element
static String SELECT_CLASS
          CSS class mapping key to be used for HTML select elements
static String TABLE_CLASS
          CSS class mapping key to be used for HTML table element
static String TABLECAPTIONCELL_CLASS
          CSS class mapping key to be used for HTML table caption cell
static String TABLECELL_CLASS
          CSS class mapping key to be used for HTML table cell element
static String TABLEEVENROW_CLASS
          CSS class mapping key to be used for HTML table even numbered row
static String TABLEHEADERROW_CLASS
          CSS class mapping key to be used for HTML table header row
static String TABLEODDROW_CLASS
          CSS class mapping key to be used for HTML table odd numbered row
static String TABLEROW_CLASS
          CSS class mapping key to be used for HTML table row element
protected  Properties widgetSettings
          The factory's associated widget settings.
 
Constructor Summary
HTMLElementFactory(ContextAttributes contextAttributes, Properties widgetSettings)
          Class constructor which assigns the context attributes and widget settings.
HTMLElementFactory(Hashtable contextAttributes, Properties widgetSettings)
          Deprecated.  
 
Method Summary
 TextInputElement addCheckAttributesSupport(TextInputElement tie, FieldComponentElement fce)
          Adds field check keyword support to HTML input fields.
 TextInputElement addInputRestrictionsSupport(TextInputElement tie, FieldComponentElement fce)
          Adds input restrictions to a TextInputElement based on the associated FieldComponentElement's extended attributes.
 AccessibilityLabelElement createAccessibilityLabel(HTMLElement target, String description)
          Creates an accessibility label for the specified HTMLElement.
 ButtonElement createButton(FunctionKeyComponentElement fkce)
          Creates a ButtonElement from a FunctionKeyComponentElement.
 ButtonElement createButton(ListItemComponentElement lice)
          Creates a ButtonElement from a ListItemComponentElement.
 CheckboxElement createCheckbox(InputComponentElement ice)
          Creates a CheckBoxElement from an InputComponentElement.
 SelectElement createDropdown(ComponentElementList cel, String captionType)
          Creates a SelectElement from a ComponentElementList.
 SelectElement createDropdown(SelectionComponentElement sce, String captionType)
          Calls createDropdown(SelectionComponentElement,String,int) with a 0 mininum item length.
 SelectElement createDropdown(SelectionComponentElement sce, String captionType, int minItemLength)
          Creates a SelectElement from a SelectionComponentElement.
 HTMLElement createElementFromComponent(ComponentElement ce)
          Returns null.
 HTMLElement createGenericElement(String tagName)
          Convenience method for creating an untyped HTMLElement with the specified tag name, also applies the style overrides.
 HTMLElement createGenericElement(String tagName, String classKey)
          Convenience method for creating an untyped HTMLElement with the specified tag name, also applies the style overrides and performs a CSS class lookup.
 InputElement createHiddenInput(FieldComponentElement ce)
          Creates a InputElement of type hidden from a FieldComponentElement.
 LinkElement createLink(FunctionKeyComponentElement fkce)
          Creates a LinkElement from a FunctionKeyComponentElement.
 LinkElement createLink(ListItemComponentElement lice)
          Creates a LinkElement from a ListItemComponentElement.
 LinkElement createLink(URLComponentElement urlce)
          Creates a LinkElement from a URLComponentElement.
 OptionElement createOptionElement(FunctionKeyComponentElement fkce, String captionType)
          Creates an OptionElement from a FunctionKeyComponentElement.
 OptionElement createOptionElement(ListItemComponentElement item, String captionType)
          Creates an OptionElement from a ListItemComponentElement.
 PopupElement createPopup(SelectionComponentElement sce)
           
 PopupElement createPopup(SelectionComponentElement sce, String captionType, boolean autoSubmit)
          Creates a PopupElement from a SelectionComponentElement.
 RadioInputElement createRadioButton(FunctionKeyComponentElement fkce, String captionType)
          Creates a RadioInputElement from a FunctionKeyComponentElement.
 RadioInputElement createRadioButton(ListItemComponentElement item, String captionType)
          Creates a RadioInputElement from a ListItemComponentElement.
 ArrayList createRadioButtons(ComponentElementList cel, String captionType)
          Creates an ArrayList of RadioInputElements from a ComponentElementList.
 ArrayList createRadioButtons(SelectionComponentElement sce, String captionType)
          Creates an ArrayList of RadioInputElements from a SelectionComponentElement
 InputElement createSubmitButton(FieldComponentElement fce)
          Creates a InputElement of type button from a FieldComponentElement.
 ArrayList createTargetField(SelectionComponentElement sce)
           
 TextInputElement createTextInput(FieldComponentElement ce)
          Creates a TextInputElement from a FieldComponentElement.
 boolean escapeHTML()
           
static String generateElementName(FieldComponentElement fce)
          Generates a HATS-formatted form element name for the specified field, calls generateElementName with the field's start position and length.
static String generateElementName(FieldComponentElement fce, int screenid)
           
static String generateElementName(int startPos, int length)
          Generates an encoded name for an html element corresponding the region of the screen with the specified parameters.
static String generateElementName(int startPos, int length, int screenId)
           
 String generatePositionId(int pos)
           
 String generatePositionId(int pos, String prefix)
           
static String getCaption(FunctionKeyComponentElement fkce, String captionType)
          Creates a caption from a FunctionKeyComponentElement.
static String getCaption(ListItemComponentElement lice, String captionType)
          Creates a caption from a ListItemComponentElement.
 ContextAttributes getContextAttributes()
          Gets the context attributes associated with this factory.
 Map getCSSMapping()
          Returns the CSS class mapping.
 String getStyleOverrides()
          Returns the style overrides which are applied to all generated HTML elements.
 String getValidValuesPopupId(String fieldName)
          Generates the html element id for popup's floating region.
static HTMLElementFactory newInstance(ContextAttributes contextAttributes, Properties widgetSettings)
          Preferred method for creating instances of an HTMLElementFactory.
static HTMLElementFactory newInstance(Hashtable contextAttributes, Properties widgetSettings)
          Deprecated.  
 void setClass(HTMLElement e, String key)
          Sets the classname for an HTML element from the stored CSS class mapping.
 void setContextAttributes(ContextAttributes attribs)
          Sets the context attributes for this factory.
 void setContextAttributes(Hashtable attribs)
          Deprecated.  
 void setCSSMapping(Map m)
          Sets the CSS class mapping.
 void setStyle(HTMLElement e)
          Sets the style overrides for an HTMLElement from the stored style overrides.
 void setStyleOverrides(String styleOverrides)
          Sets the styleOverrides.
 void setWidgetSettings(Properties widgetSettings)
          Assigns the associated widget settings for this factory.
 TextInputElement stripUnderscoresFromValue(TextInputElement tie)
          Removes underscores from the end of a text input's value, and repads the value with spaces.
 TextInputElement trimSpacesFromValue(TextInputElement tie)
          Trims the value of a TextInputElement using the String.trim() method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASSNAME

public static final String CLASSNAME
See Also:
Constant Field Values

SELECT_CLASS

public static final String SELECT_CLASS
CSS class mapping key to be used for HTML select elements

See Also:
Constant Field Values

OPTION_CLASS

public static final String OPTION_CLASS
CSS class mapping key to be used for HTML option elements

See Also:
Constant Field Values

INPUT_CLASS

public static final String INPUT_CLASS
CSS class mapping key to be used for HTML text input elements

See Also:
Constant Field Values

POPUP_CLASS

public static final String POPUP_CLASS
CSS class mapping key to be used for a popup DIV element

See Also:
Constant Field Values

POPUP_TABLE_CLASS

public static final String POPUP_TABLE_CLASS
CSS class mapping key to be used for HTML table in a popup

See Also:
Constant Field Values

POPUP_TR_CLASS

public static final String POPUP_TR_CLASS
CSS class mapping key to be used for HTML table in a popup

See Also:
Constant Field Values

POPUP_TH_CLASS

public static final String POPUP_TH_CLASS
CSS class mapping key to be used for HTML table in a popup

See Also:
Constant Field Values

POPUP_TD_CLASS

public static final String POPUP_TD_CLASS
CSS class mapping key to be used for HTML table in a popup

See Also:
Constant Field Values

LINK_CLASS

public static final String LINK_CLASS
CSS class mapping key to be used for HTML A element

See Also:
Constant Field Values

IMGLINK_CLASS

public static final String IMGLINK_CLASS
CSS class mapping key to be used for a popup launcher element

See Also:
Constant Field Values

ITEMLINK_CLASS

public static final String ITEMLINK_CLASS
CSS class mapping key to be used for popup item elements

See Also:
Constant Field Values

RADIOBUTTON_CLASS

public static final String RADIOBUTTON_CLASS
CSS class mapping key to be used for HTML input radio element

See Also:
Constant Field Values

TABLE_CLASS

public static final String TABLE_CLASS
CSS class mapping key to be used for HTML table element

See Also:
Constant Field Values

TABLEROW_CLASS

public static final String TABLEROW_CLASS
CSS class mapping key to be used for HTML table row element

See Also:
Constant Field Values

TABLECELL_CLASS

public static final String TABLECELL_CLASS
CSS class mapping key to be used for HTML table cell element

See Also:
Constant Field Values

TABLEODDROW_CLASS

public static final String TABLEODDROW_CLASS
CSS class mapping key to be used for HTML table odd numbered row

See Also:
Constant Field Values

TABLEEVENROW_CLASS

public static final String TABLEEVENROW_CLASS
CSS class mapping key to be used for HTML table even numbered row

See Also:
Constant Field Values

TABLEHEADERROW_CLASS

public static final String TABLEHEADERROW_CLASS
CSS class mapping key to be used for HTML table header row

See Also:
Constant Field Values

TABLECAPTIONCELL_CLASS

public static final String TABLECAPTIONCELL_CLASS
CSS class mapping key to be used for HTML table caption cell

See Also:
Constant Field Values

LABEL_CLASS

public static final String LABEL_CLASS
CSS class mapping key to be used for assigning a class to a caption

See Also:
Constant Field Values

DESCRIPTION_CLASS

public static final String DESCRIPTION_CLASS
CSS class mapping key to be used for HTML radio button descriptions

See Also:
Constant Field Values

BUTTON_CLASS

public static final String BUTTON_CLASS
CSS class mapping key to be used for HTML input buttons

See Also:
Constant Field Values

CHECKBOX_CLASS

public static final String CHECKBOX_CLASS
CSS class mapping key to be used for HTML checkboxes

See Also:
Constant Field Values

contextAttributes

protected ContextAttributes contextAttributes
The factory's associated context attributes.


widgetSettings

protected Properties widgetSettings
The factory's associated widget settings.

Constructor Detail

HTMLElementFactory

public HTMLElementFactory(ContextAttributes contextAttributes,
                          Properties widgetSettings)
Class constructor which assigns the context attributes and widget settings. Use newInstance instead.

See Also:
HTMLElementFactory.newInstance(Hashtable, Properties)

HTMLElementFactory

public HTMLElementFactory(Hashtable contextAttributes,
                          Properties widgetSettings)
Deprecated. 

Class constructor which assigns the context attributes and widget settings. Use newInstance instead.

See Also:
HTMLElementFactory.newInstance(Hashtable, Properties)
Method Detail

createElementFromComponent

public HTMLElement createElementFromComponent(ComponentElement ce)
Returns null. Not currently used.


createTextInput

public TextInputElement createTextInput(FieldComponentElement ce)
Creates a TextInputElement from a FieldComponentElement.


createHiddenInput

public InputElement createHiddenInput(FieldComponentElement ce)
Creates a InputElement of type hidden from a FieldComponentElement.


createTargetField

public ArrayList createTargetField(SelectionComponentElement sce)

createDropdown

public SelectElement createDropdown(SelectionComponentElement sce,
                                    String captionType)
Calls createDropdown(SelectionComponentElement,String,int) with a 0 mininum item length.

See Also:
HTMLElementFactory.createDropdown(SelectionComponentElement, String, int)

createDropdown

public SelectElement createDropdown(SelectionComponentElement sce,
                                    String captionType,
                                    int minItemLength)
Creates a SelectElement from a SelectionComponentElement.

Parameters:
sce - the SelectionComponentElement
captionType - used as parameter when constructing OptionElements captions
minItemLength - minimum length for option values, will be used to pad OptionElement values
See Also:
HTMLElementFactory.getCaption(ListItemComponentElement, String)

createDropdown

public SelectElement createDropdown(ComponentElementList cel,
                                    String captionType)
Creates a SelectElement from a ComponentElementList. If the CEL type is a SelectionComponentElement, this calls the more specific createDropdown method. If not a SelectionComponentElement, assume the CEL consists of FunctionKeyComponentElements.

Parameters:
cel - the ComponentElementList
captionType - used as parameter when constructing OptionElements captions
See Also:
HTMLElementFactory.createDropdown(SelectionComponentElement, String, int), HTMLElementFactory.getCaption(ListItemComponentElement, String)

createRadioButtons

public ArrayList createRadioButtons(SelectionComponentElement sce,
                                    String captionType)
Creates an ArrayList of RadioInputElements from a SelectionComponentElement

Parameters:
sce - the ComponentElement
captionType - used as parameter when constructing RadioInputElement descriptions
Returns:
ArrayList of RadioInputElements
See Also:
HTMLElementFactory.createRadioButton(ListItemComponentElement, String), HTMLElementFactory.getCaption(ListItemComponentElement, String)

createRadioButtons

public ArrayList createRadioButtons(ComponentElementList cel,
                                    String captionType)
Creates an ArrayList of RadioInputElements from a ComponentElementList. If the CEL type is a SelectionComponentElement, this calls the more specific createRadioButtons method. If not a SelectionComponentElement, assume the CEL consists of FunctionKeyComponentElements.

Parameters:
cel - the ComponentElementList
captionType - used as parameter when constructing OptionElements captions
See Also:
HTMLElementFactory.createRadioButtons(SelectionComponentElement, String), HTMLElementFactory.getCaption(ListItemComponentElement, String)

createPopup

public PopupElement createPopup(SelectionComponentElement sce)

createPopup

public PopupElement createPopup(SelectionComponentElement sce,
                                String captionType,
                                boolean autoSubmit)
Creates a PopupElement from a SelectionComponentElement.


createButton

public ButtonElement createButton(FunctionKeyComponentElement fkce)
Creates a ButtonElement from a FunctionKeyComponentElement. The html button will send the function key to the host.

Parameters:
fkce - the function Key
Returns:
the button

createRadioButton

public RadioInputElement createRadioButton(FunctionKeyComponentElement fkce,
                                           String captionType)
Creates a RadioInputElement from a FunctionKeyComponentElement.

Parameters:
fkce - the function key
captionType - used as parameter when constructing the description for this radio button
Returns:
the radio button
See Also:
HTMLElementFactory.getCaption(FunctionKeyComponentElement, String)

createRadioButton

public RadioInputElement createRadioButton(ListItemComponentElement item,
                                           String captionType)
Creates a RadioInputElement from a ListItemComponentElement.

Parameters:
item - the list item
captionType - used as parameter when constructing the description for this radio button
Returns:
the radio button
See Also:
HTMLElementFactory.getCaption(ListItemComponentElement, String)

createOptionElement

public OptionElement createOptionElement(ListItemComponentElement item,
                                         String captionType)
Creates an OptionElement from a ListItemComponentElement.

Parameters:
item - the list item
captionType - used as parameter when constructing the description for this option
Returns:
the selection option
See Also:
HTMLElementFactory.getCaption(ListItemComponentElement, String)

createOptionElement

public OptionElement createOptionElement(FunctionKeyComponentElement fkce,
                                         String captionType)
Creates an OptionElement from a FunctionKeyComponentElement.

Parameters:
fkce - the function key
captionType - used as parameter when constructing the description for this option
Returns:
the selection option
See Also:
HTMLElementFactory.getCaption(FunctionKeyComponentElement, String)

createSubmitButton

public InputElement createSubmitButton(FieldComponentElement fce)
Creates a InputElement of type button from a FieldComponentElement. The HTML button will put focus into the specified field and send its associated action key.

Parameters:
fce - the field
Returns:
the submit button

createLink

public LinkElement createLink(FunctionKeyComponentElement fkce)
Creates a LinkElement from a FunctionKeyComponentElement. The HTML link will send the function key to the host.

Parameters:
fkce - The function key.
Returns:
The link.

createButton

public ButtonElement createButton(ListItemComponentElement lice)
Creates a ButtonElement from a ListItemComponentElement. The HTML button will perform the list item's onSelect actions.

Parameters:
lice - the list item
Returns:
the button

createLink

public LinkElement createLink(ListItemComponentElement lice)
Creates a LinkElement from a ListItemComponentElement. The HTML link will perform the list item's onSelect actions.

Parameters:
lice - the list item
Returns:
the link

createLink

public LinkElement createLink(URLComponentElement urlce)
Creates a LinkElement from a URLComponentElement. The HTML link will redirect the browser to the associated URL.

Parameters:
urlce - the url
Returns:
the link

createCheckbox

public CheckboxElement createCheckbox(InputComponentElement ice)
Creates a CheckBoxElement from an InputComponentElement. The HTML checkbox will focus into the input field and update it with either a value associated with the checked state or a value associated with the unchecked state.

Parameters:
ice - the input field
Returns:
the checkbox

createAccessibilityLabel

public AccessibilityLabelElement createAccessibilityLabel(HTMLElement target,
                                                          String description)
Creates an accessibility label for the specified HTMLElement.

Parameters:
target - the targeted HTML element
description - the description of the targeted element
Returns:
the label

createGenericElement

public HTMLElement createGenericElement(String tagName)
Convenience method for creating an untyped HTMLElement with the specified tag name, also applies the style overrides.

Example:

 HTMLElement tableCell = factory.createGenericElement("TD");
 

Parameters:
tagName - the desired tag name
Returns:
the HTML element

createGenericElement

public HTMLElement createGenericElement(String tagName,
                                        String classKey)
Convenience method for creating an untyped HTMLElement with the specified tag name, also applies the style overrides and performs a CSS class lookup.

Example:


 HTMLElement tableCell = factory.createGenericElement("TD",HTMLElementFactory.TABLECELL_CLASS);
 

Parameters:
tagName - the desired tag name
classKey - the CSS class mapping key for this element
Returns:
the HTML element

generateElementName

public static String generateElementName(FieldComponentElement fce)
Generates a HATS-formatted form element name for the specified field, calls generateElementName with the field's start position and length.

Parameters:
fce - the field
Returns:
the fields form element name
See Also:
HTMLElementFactory.generateElementName(int, int)

generateElementName

public static String generateElementName(FieldComponentElement fce,
                                         int screenid)

generateElementName

public static String generateElementName(int startPos,
                                         int length)
Generates an encoded name for an html element corresponding the region of the screen with the specified parameters.

Parameters:
startPos - The region's start position.
length - The region's length.
Returns:
An encoded name for an html element corresponding the region of the screen with the specified parameters.

generateElementName

public static String generateElementName(int startPos,
                                         int length,
                                         int screenId)

generatePositionId

public String generatePositionId(int pos)

generatePositionId

public String generatePositionId(int pos,
                                 String prefix)

getCSSMapping

public Map getCSSMapping()
Returns the CSS class mapping.

Returns:
Hashtable

getStyleOverrides

public String getStyleOverrides()
Returns the style overrides which are applied to all generated HTML elements.

Returns:
String

setStyle

public void setStyle(HTMLElement e)
Sets the style overrides for an HTMLElement from the stored style overrides. If the overrides are null, nothing is done.

Parameters:
e - the HTML element to configure

setClass

public void setClass(HTMLElement e,
                     String key)
Sets the classname for an HTML element from the stored CSS class mapping. If there is no class for the specified key, nothing is done.

Parameters:
e - the HTML element to configure
key - the CSS class mapping key

setCSSMapping

public void setCSSMapping(Map m)
Sets the CSS class mapping.

Parameters:
m - The cssClasses to set

setStyleOverrides

public void setStyleOverrides(String styleOverrides)
Sets the styleOverrides.

Parameters:
styleOverrides - The styleOverrides to set

getContextAttributes

public ContextAttributes getContextAttributes()
Gets the context attributes associated with this factory.

Returns:
The context attributes associated with this factory.

setContextAttributes

public void setContextAttributes(ContextAttributes attribs)
Sets the context attributes for this factory.

Parameters:
attribs - The context attributes to be set.

setContextAttributes

public void setContextAttributes(Hashtable attribs)
Deprecated. 

Sets the context attributes for this factory.

Parameters:
attribs - The context attributes to be set.

getValidValuesPopupId

public String getValidValuesPopupId(String fieldName)
Generates the html element id for popup's floating region.

Parameters:
fieldName - the HSR-formatted form element name for the input field of the popup
Returns:
the id of the floating region

addInputRestrictionsSupport

public TextInputElement addInputRestrictionsSupport(TextInputElement tie,
                                                    FieldComponentElement fce)
Adds input restrictions to a TextInputElement based on the associated FieldComponentElement's extended attributes. This supports alpha-only, digit-only, signed numeric, and numeric restrictions.

Parameters:
tie - the HTML input to configure
fce - the field associated with the input
Returns:
updated text input

addCheckAttributesSupport

public TextInputElement addCheckAttributesSupport(TextInputElement tie,
                                                  FieldComponentElement fce)
Adds field check keyword support to HTML input fields. Supports the following:

Validity checking (5250 only):

Keyboard control (5250 only):

Parameters:
tie - the html text input to configure
fce - the field associated with this text input
Returns:
updated text input

stripUnderscoresFromValue

public TextInputElement stripUnderscoresFromValue(TextInputElement tie)
Removes underscores from the end of a text input's value, and repads the value with spaces.

Parameters:
tie - the text input to update
Returns:
the updates text input

trimSpacesFromValue

public TextInputElement trimSpacesFromValue(TextInputElement tie)
Trims the value of a TextInputElement using the String.trim() method. *

Parameters:
tie - text input to trim
Returns:
modified text input element

newInstance

public static HTMLElementFactory newInstance(ContextAttributes contextAttributes,
                                             Properties widgetSettings)
Preferred method for creating instances of an HTMLElementFactory. Examines the context attributes and determines if the regular or bidi HTMLElementFactory should be instantiated

Parameters:
contextAttributes -
widgetSettings -
Returns:
new HTMLElementFactory

newInstance

public static HTMLElementFactory newInstance(Hashtable contextAttributes,
                                             Properties widgetSettings)
Deprecated. 

Preferred method for creating instances of an HTMLElementFactory. Examines the context attributes and determines if the regular or bidi HTMLElementFactory should be instantiated

Parameters:
contextAttributes -
widgetSettings -
Returns:
new HTMLElementFactory

setWidgetSettings

public void setWidgetSettings(Properties widgetSettings)
Assigns the associated widget settings for this factory.

Parameters:
widgetSettings -

getCaption

public static String getCaption(ListItemComponentElement lice,
                                String captionType)
Creates a caption from a ListItemComponentElement. If the captionType is TOKEN, this returns ListItemComponentElement.getItem(). If the caption type is BOTH, returns ListItemComponentElement.getFullCaption(). If captionType is null or any other value, this returns ListItemComponentElement.getDescription().

Parameters:
lice - list item to construct caption from
captionType - type of caption to build
Returns:
the caption

getCaption

public static String getCaption(FunctionKeyComponentElement fkce,
                                String captionType)
Creates a caption from a FunctionKeyComponentElement. If the captionType is TOKEN, this returns FunctionKeyComponentElement.getItem(). If the caption type is BOTH, returns FunctionKeyComponentElement.getFullCaption(). If captionType is null or any other value, this returns FunctionKeyComponentElement.getCaption().

Parameters:
fkce - function key to construct caption from
captionType - type of caption to build
Returns:
the caption

escapeHTML

public boolean escapeHTML()

HATS 7.5.1 (201005110649)