com.sas.servlet.tbeans
Class BaseLabel

com.sas.servlet.tbeans.BaseLabel
All Implemented Interfaces:
ActionProviderViewInterface, HttpActionProviderInterface, HttpActionProviderViewInterface, com.sas.beans.PropertyChangeSource, com.sas.lang.ObjectDataInterface, RenderableInterface, StyleInterface, com.sas.servlet.tbeans.TitleInterface, TransformationInterface, URLInterface, com.sas.util.WriteToPrintWriterInterface, java.io.Serializable
Direct Known Subclasses:
Label

public abstract class BaseLabel
implements StyleInterface, URLInterface, com.sas.servlet.tbeans.TitleInterface

The BaseLabel is an abstract TransformationBean™ used to create a label.

Note that subclasses of this bean actually provide the markup rendering used in/with Servlet and JavaServer Pages technologies. If you need to add support for a markup language that is not explicitly provided with AppDev Studio, then you must extend this class.

For More Information:

JSP custom tags provide an alternative to using the TransformationBeans™. Visit the Custom Tag Library Reference for additional information on the sas:Label custom tag.

Note: A snapshot of the AppDev Studio Developers Site is installed on your local Web server when you install AppDev Studio. To access the site from webAF, select Help -> Developer Site .

See Also:
Serialized Form

Constructor Summary
BaseLabel()
          Default constructor.
 
Method Summary
 HttpActionProvider getActionProvider()
          Returns the ActionProvider object
 java.lang.String getActionSupportType()
          Return the key that associated with a particular support class in the ActionProvider framework.
 java.lang.String getFor()
          Gets the label for attribute.
 java.lang.String getNullTextString()
          Gets the String value to be written when the label text is null.
 StyleInfo getStyleInfo()
          Returns the style info for this Label.
 java.lang.String getTarget()
          Returns the value of the TARGET= argument used on the anchor tags generated.
 java.lang.String getText()
          Gets the text.
 java.lang.String getTitle()
          Gets the title of the label.
 java.lang.String getURL()
          Gets the destination URL for the text's link.
 boolean isEncodedURL()
          Gets the boolean indicating whether to set URL encoding on the link.
 boolean isEncodeText()
          Gets the boolean indicating whether the Label's text will be encoded using com.sas.util.Strings.quoteForXML.
 void setEncodedURL(boolean flag, javax.servlet.http.HttpServletResponse resp)
          Sets the conditional indicating whether to set URL encoding on the link that is written.
 void setEncodeText(boolean encodeText)
          Sets the boolean indicating whether the Label's text will be encoded using com.sas.util.Strings.quoteForXML.
 void setFor(java.lang.String value)
          Sets the label for attribute.
 void setNullTextString(java.lang.String nullTextString)
          Sets the String value to be written when the label text is null.
 void setStyleInfo(StyleInfo styleInfo)
          Sets the style info for this Label.
 void setTarget(java.lang.String value)
          Sets the value of the TARGET= argument used on the anchor tags generated.
 void setText(java.lang.String value)
          Sets the text.
 void setTitle(java.lang.String value)
          Sets the title for the label.
 void setURL(java.lang.String location)
          Sets the destination URL for the text's link.
 
Methods inherited from class com.sas.servlet.tbeans.BaseActionTransformation
dispose, getUniqueId, isActionVisible, listActionTypes, listAreaTypes, setActionProvider, setActionSupportType, setActionVisible, setUniqueId, write
 
Methods inherited from class com.sas.servlet.tbeans.BaseTransformation
addPropertyChangeListener, addPropertyChangeListener, cleanUpResources, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getCustomAttributes, getDescription, getId, getInputTransform, getLocale, getName, getObjectData, getObjectDataProperty, getOutputTransform, getRequest, getResponse, getTagEpilog, getTagProlog, hasListeners, isCleanUpResourcesOn, isVisible, removePropertyChangeListener, removePropertyChangeListener, setCleanUpResourcesOn, setCustomAttributes, setDescription, setId, setInputTransform, setLocale, setLocaleDependentProperties, setName, setObjectData, setObjectDataProperty, setOutputTransform, setRequest, setResponse, setTagEpilog, setTagProlog, setVisible, toString, write, write, write
 
Methods inherited from interface com.sas.actionprovider.HttpActionProviderViewInterface
getRequest, setRequest
 

Constructor Detail

BaseLabel

public BaseLabel()
Default constructor.

Method Detail

setNullTextString

public void setNullTextString(java.lang.String nullTextString)
Sets the String value to be written when the label text is null. The default is null.

Parameters:
nullTextString - The String to be written when the text is null

getNullTextString

public java.lang.String getNullTextString()
Gets the String value to be written when the label text is null. The default is null.

Returns:
The String to be written when the text is null

setText

public void setText(java.lang.String value)
Sets the text.

Parameters:
text - The text

getText

public java.lang.String getText()
Gets the text.

Returns:
text The text

setURL

public void setURL(java.lang.String location)
Sets the destination URL for the text's link.

Specified by:
setURL in interface URLInterface
Parameters:
location - The destination URL for the link

getURL

public java.lang.String getURL()
Gets the destination URL for the text's link.

Specified by:
getURL in interface URLInterface
Returns:
location The destination URL for the link

setEncodeText

public void setEncodeText(boolean encodeText)
Sets the boolean indicating whether the Label's text will be encoded using com.sas.util.Strings.quoteForXML. The default is set to true.

Parameters:
encodeText - Flag indicating whether to set text encoding.

isEncodeText

public boolean isEncodeText()
Gets the boolean indicating whether the Label's text will be encoded using com.sas.util.Strings.quoteForXML. The default is set to True.

Returns:
True if the Label's text is to be encoded.

setEncodedURL

public void setEncodedURL(boolean flag,
                          javax.servlet.http.HttpServletResponse resp)
Sets the conditional indicating whether to set URL encoding on the link that is written. The URL encoding determines whether a request contains an identifiable session ID passed in via HTTP cookies. If no cookie information is detected, URL encoding automatically attaches the session ID to the URL to persist session information.

Also sets the HTTP servlet response object.

Parameters:
flag - A flag indicating whether to set URL encoding
resp - The servlet response object

isEncodedURL

public boolean isEncodedURL()
Gets the boolean indicating whether to set URL encoding on the link.

Returns:
True if URL encoding is enabled for the link.

getTarget

public java.lang.String getTarget()
Returns the value of the TARGET= argument used on the anchor tags generated. This value determines where/how the links associated with the static text.

Returns:
TARGET= argument of the anchor tags

setTarget

public void setTarget(java.lang.String value)
Sets the value of the TARGET= argument used on the anchor tags generated.

Parameters:
value - The value of the TARGET= argument on the anchor tag

getStyleInfo

public StyleInfo getStyleInfo()
Returns the style info for this Label.

Specified by:
getStyleInfo in interface StyleInterface
Returns:
style used for this Label

setStyleInfo

public void setStyleInfo(StyleInfo styleInfo)
Sets the style info for this Label.

Specified by:
setStyleInfo in interface StyleInterface
Parameters:
styleInfo - The style for this Label

setFor

public void setFor(java.lang.String value)
Sets the label for attribute.

Parameters:
value - The label for attribute

getFor

public java.lang.String getFor()
Gets the label for attribute.

Returns:
For= The element this label is for

setTitle

public void setTitle(java.lang.String value)
Sets the title for the label.

Specified by:
setTitle in interface com.sas.servlet.tbeans.TitleInterface
Parameters:
value - The title of the label

getTitle

public java.lang.String getTitle()
Gets the title of the label.

Returns:
title The title

getActionSupportType

public java.lang.String getActionSupportType()
Return the key that associated with a particular support class in the ActionProvider framework.
Never returns null. If not set, defaults to ActionProviderSupportTypes.CUSTOM_SUPPORT

Specified by:
getActionSupportType in interface ActionProviderViewInterface
Overrides:
getActionSupportType in class BaseActionTransformation
Returns:
the key that associated with a particular support class.
See Also:
ActionProviderViewInterface.setActionSupportType(java.lang.String), ActionProviderSupportTypes

getActionProvider

public HttpActionProvider getActionProvider()
Returns the ActionProvider object

Specified by:
getActionProvider in interface HttpActionProviderInterface
Overrides:
getActionProvider in class BaseActionTransformation
Returns:
ActionProvider object
See Also:
HttpActionProviderInterface.setActionProvider(com.sas.actionprovider.HttpActionProvider)



Copyright © 2009 SAS Institute Inc. All Rights Reserved.