wt.templateutil.components
Class HTMLComponent

java.lang.Object
  extended bywt.templateutil.components.HTMLComponent
Direct Known Subclasses:
DefaultHTMLComponent, DefaultStringComponent, HTMLButtonComponent, HTMLCheckBoxComponent, HTMLFont, HTMLImgComponent, HTMLLinkComponent, HTMLSelectComponent, HTMLTableCellComponent, HTMLTableComponent, HTMLTextInputComponent, LifeCycleStateComponent, NameComponent

public abstract class HTMLComponent
extends Object

This abstract component contains the common processing code for displaying and HTML component. It handles tag fomat, tag attributes, and nesting of components.In most cases any HTML component can be displayed simply by calling the show() method defined in this class.

Deprecation Notice: This class is still valid for this release, however this serves as advance notice that it will be removed in the future. All user interfaces built using the Windchill HTML Template Processing client architecture will be rewritten using a different framework in an upcoming release.

Supported API: true

Extendable: true


Field Summary
static String CLASS
          Deprecated.  
private static String CLASSNAME
          Deprecated.  
private static String CODEBASE
          Deprecated.  
static String COMPONENT_ID
          Deprecated.  
static String COMPONENT_ID_SEPARATOR
          Deprecated.  
static String CREATE
          Deprecated.  
static String DEFAULT_SERVICE_NAME
          Deprecated.  
static String DEFAULTS_ONLY
          Deprecated.  
static String EMPTY_STRING
          Deprecated.  
private  Vector htmlComponents
          Deprecated.  
static String ID
          Deprecated.  
static Locale ID_US_ENGLISH_LOCALE
          Deprecated.  
private  boolean inheritStyle
          Deprecated.  
private  String name
          Deprecated.  
static String NAME
          Deprecated.  
static String NULLVALUE
          Deprecated.  
static String PRINT_TAG_ATTR
          Deprecated.  
private  boolean printTagAttributes
          Deprecated.  
private static String RESOURCE
          Deprecated.  
private  String serviceName
          Deprecated.  
static String SERVICENAME
          Deprecated.  
private  HTTPState state
          Deprecated.  
private  String tag
          Deprecated.  
static String TAG
          Deprecated.  
private  String[] tagList
          Deprecated.  
private static Hashtable tagResourceKeys
          Deprecated.  
private  Hashtable tagSettings
          Deprecated.  
static String UPDATE
          Deprecated.  
private  boolean useDefaultsOnly
          Deprecated.  
protected static boolean VERBOSE
          Deprecated.  
static String VIEW
          Deprecated.  
private  PrintWriter writer
          Deprecated.  
 
Constructor Summary
HTMLComponent()
          Deprecated.  
 
Method Summary
private  void addAdditionalAttributes()
          Deprecated.  
private  void addAttribute(String attribute)
          Deprecated.  
private  void addClassAttribute()
          Deprecated.  
private  void addIDAttribute()
          Deprecated.  
 StringBuffer appendID(StringBuffer buffer)
          Deprecated. Appends ID= to buffer.
 StringBuffer appendID(StringBuffer buffer, String suffix)
          Deprecated. Appends " ID=COMPONENT_ID_SEPERATOR " to buffer.
 String appendToID(String suffix)
          Deprecated. Returns a string in the format COMPONENT_ID_SEPERATOR.
static String appendToID(String id, String suffix)
          Deprecated. Returns a string in the format COMPONENT_ID_SEPERATOR.
static String createIDForComponent(Object value)
          Deprecated. If value is WTObject, DefaultMutableTreeNode, shortcut, or WTAttribute then a unique id on the objects DisplayIdentity is created and returned.
 String endComponent(Object value, OutputStream os, Locale locale)
          Deprecated.  
 Vector getHtmlComponents()
          Deprecated.  
 String getID()
          Deprecated. Returns the component's ID value.
private  String getID(Hashtable props)
          Deprecated. Returns the value of the ID property set in props.
private  String getIDEqualsValue(String value)
          Deprecated.  
protected static String getIdProp(Properties props)
          Deprecated. Looks for value for the key "id" (case insensitive) in props.
 String getName()
          Deprecated.  
protected  String getOID(Object value)
          Deprecated. As of WNC 6.2.6 DSU03. To get a unique string see createIDForComponent.
 PrintWriter getPrintWriter(OutputStream out, Locale locale)
          Deprecated.  
protected  Object getRealValue(Object value)
          Deprecated. Used by components to get the right object to use to creat trail ids, urls, label values etc.
 String getServiceName()
          Deprecated.  
 HTTPState getState()
          Deprecated.  
 String getTag()
          Deprecated.  
 String getTagID(Hashtable props)
          Deprecated. If there is an entry for the .ID key then the id value is returned.
 String getTagIDKey()
          Deprecated. Returns the .ID value based on getTag().
 String[] getTagList()
          Deprecated.  
 Hashtable getTagSettings()
          Deprecated.  
static URLFactory getURLFactory()
          Deprecated.  
 void init(String selector, Object value, HTMLComponentFactory componentFactory, String mode, Properties props)
          Deprecated.  
 String insertID(String htmlString)
          Deprecated. Inserts ID= right after the tag value in the string for this instance.
 String insertID(String tag, String htmlString)
          Deprecated. Inserts ID= right after the specified tag value.
 boolean isInheritStyle()
          Deprecated.  
 boolean isPrintTagAttributes()
          Deprecated.  
 boolean isUseDefaultsOnly()
          Deprecated.  
static void main(String[] args)
          Deprecated.  
private static String makeSureNotQuoted(String value)
          Deprecated.  
 String putTagID(Hashtable props, String value)
          Deprecated.  
 String putTagID(Hashtable props, String tagIDKey, String idSuffix)
          Deprecated.  
 String removeID(Hashtable props)
          Deprecated. Removes entry for ID property from props.
 String removeTagID(Hashtable props)
          Deprecated. Removes entry for .ID key from props.
 void setHtmlComponents(Vector a_HtmlComponents)
          Deprecated.  
 void setID(String value)
          Deprecated. Sets the components ID value to the specified value.
 void setInheritStyle(boolean a_InheritStyle)
          Deprecated.  
 void setName(String name)
          Deprecated.  
 void setPrintTagAttributes(boolean a_PrintTagAttributes)
          Deprecated.  
 void setServiceName(String a_ServiceName)
          Deprecated.  
 void setState(HTTPState state)
          Deprecated.  
 void setTag(String a_Tag)
          Deprecated.  
 void setTagList(String[] a_TagList)
          Deprecated.  
abstract  void setTagListArray()
          Deprecated.  
 void setTagListDefaults(WTProperties defaultProperties)
          Deprecated.  
 void setTagSettings(Hashtable a_TagSettings)
          Deprecated.  
 void setTagValue(String tagID, String tagValue)
          Deprecated.  
 void setUseDefaultsOnly(boolean a_UseDefaultsOnly)
          Deprecated.  
 String show(Object value, Properties formData, OutputStream os, Locale locale)
          Deprecated.  
 String showSubComponents(Object value, Properties formData, OutputStream os, Locale locale)
          Deprecated.  
 String startComponent(Object value, Properties formData, OutputStream os, Locale locale)
          Deprecated.  
private static String unquoteAndReplaceSplCharsInID(String value)
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
Deprecated. 
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME
Deprecated. 

tagList

private String[] tagList
Deprecated. 

tagSettings

private Hashtable tagSettings
Deprecated. 

DEFAULT_SERVICE_NAME

public static final String DEFAULT_SERVICE_NAME
Deprecated.  



Supported API: true

See Also:
Constant Field Values

useDefaultsOnly

private boolean useDefaultsOnly
Deprecated. 

serviceName

private String serviceName
Deprecated. 

tag

private String tag
Deprecated. 

printTagAttributes

private boolean printTagAttributes
Deprecated. 

inheritStyle

private boolean inheritStyle
Deprecated. 

DEFAULTS_ONLY

public static final String DEFAULTS_ONLY
Deprecated.  



Supported API: true

See Also:
Constant Field Values

PRINT_TAG_ATTR

public static final String PRINT_TAG_ATTR
Deprecated.  



Supported API: true

See Also:
Constant Field Values

SERVICENAME

public static final String SERVICENAME
Deprecated.  



Supported API: true

See Also:
Constant Field Values

htmlComponents

private Vector htmlComponents
Deprecated. 

NAME

public static final String NAME
Deprecated. 
See Also:
Constant Field Values

EMPTY_STRING

public static final String EMPTY_STRING
Deprecated. 
See Also:
Constant Field Values

state

private HTTPState state
Deprecated. 

VERBOSE

protected static boolean VERBOSE
Deprecated. 

CODEBASE

private static String CODEBASE
Deprecated. 

tagResourceKeys

private static Hashtable tagResourceKeys
Deprecated. 

VIEW

public static final String VIEW
Deprecated. 
See Also:
Constant Field Values

NULLVALUE

public static final String NULLVALUE
Deprecated. 
See Also:
Constant Field Values

CREATE

public static final String CREATE
Deprecated. 
See Also:
Constant Field Values

UPDATE

public static final String UPDATE
Deprecated. 
See Also:
Constant Field Values

CLASS

public static final String CLASS
Deprecated. 
See Also:
Constant Field Values

TAG

public static final String TAG
Deprecated. 
See Also:
Constant Field Values

ID

public static final String ID
Deprecated. 
See Also:
Constant Field Values

COMPONENT_ID

public static final String COMPONENT_ID
Deprecated. 
See Also:
Constant Field Values

COMPONENT_ID_SEPARATOR

public static final String COMPONENT_ID_SEPARATOR
Deprecated. 
See Also:
Constant Field Values

writer

private PrintWriter writer
Deprecated. 

name

private String name
Deprecated. 

ID_US_ENGLISH_LOCALE

public static final Locale ID_US_ENGLISH_LOCALE
Deprecated. 
Constructor Detail

HTMLComponent

public HTMLComponent()
Deprecated. 
Method Detail

getTagList

public String[] getTagList()
Deprecated.  

Gets the value of the attribute: tagList.

Supported API: true

Returns:
String[]

setTagList

public void setTagList(String[] a_TagList)
Deprecated.  

Sets the value of the attribute: tagList.

Supported API: true

Parameters:
a_TagList -

getTagSettings

public Hashtable getTagSettings()
Deprecated.  

Gets the value of the attribute: tagSettings.

Supported API: true

Returns:
Hashtable

setTagSettings

public void setTagSettings(Hashtable a_TagSettings)
Deprecated.  

Sets the value of the attribute: tagSettings.

Supported API: true

Parameters:
a_TagSettings -

isUseDefaultsOnly

public boolean isUseDefaultsOnly()
Deprecated.  

Gets the value of the attribute: useDefaultsOnly.

Supported API: true

Returns:
boolean

setUseDefaultsOnly

public void setUseDefaultsOnly(boolean a_UseDefaultsOnly)
Deprecated.  

Sets the value of the attribute: useDefaultsOnly.

Supported API: true

Parameters:
a_UseDefaultsOnly -

getServiceName

public String getServiceName()
Deprecated.  

Gets the value of the attribute: serviceName.

Supported API: true

Returns:
String

setServiceName

public void setServiceName(String a_ServiceName)
Deprecated.  

Sets the value of the attribute: serviceName.

Supported API: true

Parameters:
a_ServiceName -

getTag

public String getTag()
Deprecated.  

Gets the value of the attribute: tag.

Supported API: true

Returns:
String

setTag

public void setTag(String a_Tag)
Deprecated.  

Sets the value of the attribute: tag.

Supported API: true

Parameters:
a_Tag -

isPrintTagAttributes

public boolean isPrintTagAttributes()
Deprecated.  

Gets the value of the attribute: printTagAttributes.

Supported API: true

Returns:
boolean

setPrintTagAttributes

public void setPrintTagAttributes(boolean a_PrintTagAttributes)
Deprecated.  

Sets the value of the attribute: printTagAttributes.

Supported API: true

Parameters:
a_PrintTagAttributes -

isInheritStyle

public boolean isInheritStyle()
Deprecated.  

Gets the value of the attribute: inheritStyle.

Supported API: true

Returns:
boolean

setInheritStyle

public void setInheritStyle(boolean a_InheritStyle)
Deprecated.  

Sets the value of the attribute: inheritStyle.

Supported API: true

Parameters:
a_InheritStyle -

getHtmlComponents

public Vector getHtmlComponents()
Deprecated.  

Gets the object for the association that plays role: htmlComponents.

Supported API: true

Returns:
Vector

setHtmlComponents

public void setHtmlComponents(Vector a_HtmlComponents)
Deprecated.  

Sets the object for the association that plays role: htmlComponents.

Supported API: false

Parameters:
a_HtmlComponents -

show

public String show(Object value,
                   Properties formData,
                   OutputStream os,
                   Locale locale)
Deprecated.  

This method is the main control for the Display of all HTMLComponent subclasses. It first calls startComponent, then showSubComponents, and then endComponent. It returns a string that is the concatenation of the results of these three methods. A call to show() should be all that is needed to display any subclass component.

Supported API: true

Parameters:
value -
formData -
os -
locale -
Returns:
String

init

public void init(String selector,
                 Object value,
                 HTMLComponentFactory componentFactory,
                 String mode,
                 Properties props)
Deprecated.  

Initializes the HTML componenet using information from the Properties object.

Supported API: true

Parameters:
selector -
value - The current context object
componentFactory -
mode -
props - provides the service name and the current key if they exist.

startComponent

public String startComponent(Object value,
                             Properties formData,
                             OutputStream os,
                             Locale locale)
Deprecated.  

Displays the standard format of a starting HTML tag include the opening less than, the tag name, the key value pairs that are the tag attributes, and the closing greater than.

Supported API: true

Parameters:
value -
formData -
os -
locale -
Returns:
String

endComponent

public String endComponent(Object value,
                           OutputStream os,
                           Locale locale)
Deprecated.  

Displays the default format for a closing HTML tag. Including the opening less than, the tag name, and the closing greater than.

Supported API: true

Parameters:
value -
os -
locale -
Returns:
String

showSubComponents

public String showSubComponents(Object value,
                                Properties formData,
                                OutputStream os,
                                Locale locale)
Deprecated.  

Returns a string that is the contcatenation of the result of calling show() on all the associated subComponents sequentially.

Supported API: true

Parameters:
value -
formData -
os -
locale -
Returns:
String

setTagListArray

public abstract void setTagListArray()
Deprecated.  

Initializes the TagListArray to an array of values representing the possible attributes on the tag. For example one possible array would be: {TYPE, NAME, VALUE, ID} these attributes are later displayed in the HTML as key value pairs, for example "NAME=checkbox1"

Supported API: true


setTagListDefaults

public void setTagListDefaults(WTProperties defaultProperties)
Deprecated.  



Supported API: true

Parameters:
defaultProperties -

setTagValue

public void setTagValue(String tagID,
                        String tagValue)
Deprecated.  

This method stores the value that corresponds to one of the keys in the TagList array.

Supported API: true

Parameters:
tagID - The key value that should be found in the taglist array.
tagValue - the value that should be stored.

getPrintWriter

public PrintWriter getPrintWriter(OutputStream out,
                                  Locale locale)
Deprecated.  



Supported API: true

Parameters:
out -
locale -
Returns:
PrintWriter

main

public static void main(String[] args)
Deprecated.  



Supported API: true

Parameters:
args -

setState

public void setState(HTTPState state)
Deprecated. 

getState

public HTTPState getState()
Deprecated. 

addAdditionalAttributes

private void addAdditionalAttributes()
Deprecated. 

addClassAttribute

private void addClassAttribute()
Deprecated. 

addIDAttribute

private void addIDAttribute()
Deprecated. 

addAttribute

private void addAttribute(String attribute)
Deprecated. 

setName

public void setName(String name)
Deprecated. 

getName

public String getName()
Deprecated. 

getID

public String getID()
Deprecated. 
Returns the component's ID value.


setID

public void setID(String value)
Deprecated. 
Sets the components ID value to the specified value. If value is null then the id is not reset.


getID

private String getID(Hashtable props)
Deprecated. 
Returns the value of the ID property set in props. If props is null EMPTY_STRING is returned.


getTagIDKey

public String getTagIDKey()
Deprecated. 
Returns the .ID value based on getTag().


putTagID

public String putTagID(Hashtable props,
                       String tagIDKey,
                       String idSuffix)
Deprecated. 

putTagID

public String putTagID(Hashtable props,
                       String value)
Deprecated. 

getTagID

public String getTagID(Hashtable props)
Deprecated. 
If there is an entry for the .ID key then the id value is returned. If an entry for .ID is not found then if an entry for COMPONENT_ID is found it is used; otherwise EMPTY_STRING is returned.


appendID

public StringBuffer appendID(StringBuffer buffer)
Deprecated. 
Appends ID= to buffer. A new buffer is returned. If the value for ID is not set to a valid value then nothing is appended and the original buffer is returned. If buffer is null, then null is returned.


insertID

public String insertID(String htmlString)
Deprecated. 
Inserts ID= right after the tag value in the string for this instance. A new String is returned. If the value for ID is not set to a valid value then nothing is inserted and the original String is returned. If htmlString is null, then null is returned.


insertID

public String insertID(String tag,
                       String htmlString)
Deprecated. 
Inserts ID= right after the specified tag value. A new String is returned. If the value for ID is not set to a valid value then nothing is inserted and the original String is returned. If htmlString is null, then null is returned.


appendID

public StringBuffer appendID(StringBuffer buffer,
                             String suffix)
Deprecated. 
Appends " ID=COMPONENT_ID_SEPERATOR " to buffer. A new buffer is returned. If the value for ID is not set to a valid value then nothing is appended and the original buffer is returned. If buffer is null, then null is returned.


appendToID

public String appendToID(String suffix)
Deprecated. 
Returns a string in the format COMPONENT_ID_SEPERATOR.


appendToID

public static String appendToID(String id,
                                String suffix)
Deprecated. 
Returns a string in the format COMPONENT_ID_SEPERATOR.


getIDEqualsValue

private String getIDEqualsValue(String value)
Deprecated. 

removeID

public String removeID(Hashtable props)
Deprecated. 
Removes entry for ID property from props.


removeTagID

public String removeTagID(Hashtable props)
Deprecated. 
Removes entry for .ID key from props.


getURLFactory

public static URLFactory getURLFactory()
                                throws WTException
Deprecated. 
Throws:
WTException

makeSureNotQuoted

private static String makeSureNotQuoted(String value)
Deprecated. 

unquoteAndReplaceSplCharsInID

private static String unquoteAndReplaceSplCharsInID(String value)
Deprecated. 

getOID

protected String getOID(Object value)
Deprecated. As of WNC 6.2.6 DSU03. To get a unique string see createIDForComponent.

Based on value return an object id. The id is not what is known as the reference object id. This method is left around for legacy purposes. This method is basically a wrapper


createIDForComponent

public static String createIDForComponent(Object value)
Deprecated. 
If value is WTObject, DefaultMutableTreeNode, shortcut, or WTAttribute then a unique id on the objects DisplayIdentity is created and returned.


getIdProp

protected static String getIdProp(Properties props)
Deprecated. 
Looks for value for the key "id" (case insensitive) in props. Returns associated value if found or null otherwise.


getRealValue

protected Object getRealValue(Object value)
Deprecated. 
Used by components to get the right object to use to creat trail ids, urls, label values etc.

Returns:
the contained object that is the real value to use for further computations.