com.sas.taglib.servlet.tbeans
Class BaseTransformationBodyTag

com.sas.taglib.servlet.tbeans.BaseTransformationBodyTag
All Implemented Interfaces:
java.io.Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag, javax.servlet.jsp.tagext.TryCatchFinally
Direct Known Subclasses:
BaseActionTransformationBodyTag, BaseCompositeTransformationBodyTag, BaseFormElementBodyTag, BaseIPageTag, CellContentsSimpleTemplateRendererTag, DualListSelectorTag, ExpandCollapseTag, FormTag, LabelTag, MenuBarTag, MenuItemTag, MenuTag, TreeViewTag

public abstract class BaseTransformationBodyTag

The base object for all body tag support handlers in the SAS Custom Tag Library that are used as wrappers for TransformationBeans.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.sas.taglib.BaseBodyTag
DELIMITERS, RB_KEY
 
Constructor Summary
BaseTransformationBodyTag()
          Default constuctor
 
Method Summary
protected  void applyAttributes()
          Sets the basic attributes (request,name,prolog,epilog) common to all Transformation Beans.
 int doEndTag()
          This Method Overrides the javax.servlet.jsp.tagext.TagSupport doEndTag Method.
 int doStartTag()
          This Method Overrides the javax.servlet.jsp.tagext.TagSupport doStartTag Method.
 java.lang.String getCustomAttributes()
          Gets the customAttributes attribute (String) for a custom tag.
 java.lang.String getEpilog()
          Returns the epilog if specified, otherwise null.
 java.util.Locale getLocale()
          Get the locale
 java.lang.String getName()
          Returns the name for the custom tag
 java.lang.String getObjectDataProperty()
          Get the objectDataProperty String.
 java.lang.String getProlog()
          Returns the prolog if specified, otherwise null.
 boolean getRender()
          Returns true if the custom tag should render it's information immediately, or false otherwise.
 java.lang.String getRenderType()
          Gets the render type property for the custom tag.
protected  void initialize(boolean includeAttributes)
          Initializes attributes and variables for this tag handler.
 void setCustomAttributes(java.lang.String customAttributes)
          Sets the customAttributes attribute (String) for a custom tag.
 void setEpilog(java.lang.String epilog)
          Sets the epilog attribute (String) for a custom tag.
 void setLocale(java.util.Locale locale)
          Set the locale
 void setName(java.lang.String name)
          Sets the name attribute for a custom tag.
 void setObjectDataProperty(java.lang.String property)
          Set the String that is used as the value of the ObjectData attribute.
 void setProlog(java.lang.String prolog)
          Sets the prolog attribute (String) for a custom tag.
 void setRender(boolean render)
          Sets the render property (boolean) from a tag attribute.
 void setRenderType(java.lang.String renderType)
          Sets the rendertype property (String) from a tag attribute.
 
Methods inherited from class com.sas.taglib.BaseBodyTag
doCatch, doFinally, getApplyAttributes, getBodyStrings, getCompositeComponentKey, getInstantiate, getPageContext, getRef, getScope, getTagScope, getWrappedClassName, getWrappedObject, getWrappedObject, loadBeanInstance, newInstance, release, removeFromScope, searchContext, setApplyAttributes, setCompositeComponentKey, setInstantiate, setRef, setScope, setTagScope, setVariableWithinScope, setWrappedClassName, setWrappedObject, validate
 

Constructor Detail

BaseTransformationBodyTag

public BaseTransformationBodyTag()
Default constuctor

Method Detail

setCustomAttributes

public void setCustomAttributes(java.lang.String customAttributes)
Sets the customAttributes attribute (String) for a custom tag. The customAttributes attribute allows a user to add attributes to the resulting transformation bean output that extends the html/xml/wml or other rendering language specification.

Parameters:
customAttributes - a list of attributes in the form of attribute="value", space delimited

setEpilog

public void setEpilog(java.lang.String epilog)
Sets the epilog attribute (String) for a custom tag. The epilog is a text string that is output (or rendered) immediately following the last markup tag generated by the TransformationBean.

Parameters:
epilog - Text that is output immediately after the last markup tag.

setName

public void setName(java.lang.String name)
Sets the name attribute for a custom tag. The name is the value assigned to the name attribute of the underlying markup tag. The name String specifies the HTML or WML name of the component.

Note: If a name is not specified, then id will be used if available.

Parameters:
name - Value assigned to the markup tag's name attribute.

setProlog

public void setProlog(java.lang.String prolog)
Sets the prolog attribute (String) for a custom tag. The prolog is a text string that is output (or rendered) immediately preceeding the first markup tag generated by the TransformationBean.

Parameters:
prolog - Text that is output immediately preceeding the first markup tag.

setRender

public void setRender(boolean render)
Sets the render property (boolean) from a tag attribute. The render String specifies whether the Transformation Bean should be rendered at the end of the custom tag or not. This method also sets the visible property on the underlying TransformationBean. There are two ways to render the tag at a later time:
1. Render the object using the REF attribute
Create the Tag
<sas:checkbox id="cb" name="color" value="blue" label="blue" render="false"/>
Render the Tag later in the page
<sas:checkbox ref="cb" />
2. Render the object manually
Create the Tag
<sas:checkbox id="cb" name="color" value="blue" label="blue" render="false"/>
Render the transformation bean
<% cb.write(out); %>
Valid values are true or false.

Parameters:
render - Flag that, if true, indicates that the complete markup of the bean is output when the tag is closed. It also sets the the visible property on the underlying TransformationBean.

setRenderType

public void setRenderType(java.lang.String renderType)
Sets the rendertype property (String) from a tag attribute. The rendertype String determines which Transformation Bean to initialize.
Valid values are html, wml, hdml.

Parameters:
rendertype - Type of markup for the output tag(s).

setObjectDataProperty

public void setObjectDataProperty(java.lang.String property)
Set the String that is used as the value of the ObjectData attribute.

Parameters:
property - Value assigned to the output tag's objectDataProperty attribute.

setLocale

public void setLocale(java.util.Locale locale)
Set the locale

Overrides:
setLocale in class BaseBodyTag
Parameters:
locale - Specifies the locale to use for this instance of the class.

getCustomAttributes

public java.lang.String getCustomAttributes()
Gets the customAttributes attribute (String) for a custom tag. The customAttributes attribute allows a user to add attributes to the resulting transformation bean output that extends the html/xml/wml or other rendering language specification.

Returns:
String a list of attributes in the form of attribute="value", space delimited

getEpilog

public java.lang.String getEpilog()
Returns the epilog if specified, otherwise null.

Returns:
String the epilog

getName

public java.lang.String getName()
Returns the name for the custom tag

Returns:
String the name of the custom tag

getProlog

public java.lang.String getProlog()
Returns the prolog if specified, otherwise null.

Returns:
int the PageContext scope of the custom tag

getRender

public boolean getRender()
Returns true if the custom tag should render it's information immediately, or false otherwise.

Returns:
boolean true if the custom tag should render itself automatically

getRenderType

public java.lang.String getRenderType()
Gets the render type property for the custom tag. First, an attempt is made to determine the render type based on the browser property from the servlet request object. This information can be specified through the ClientInfo Custom Tag, or automatically. The ClientInfo tag allows you to override browser information for testing and/or tweaking. If the renderType is specified through the setRendertype method, then it will override everything else. If all else fails, render type will default to "html"

Returns:
String the render type for the transformation bean

getObjectDataProperty

public java.lang.String getObjectDataProperty()
Get the objectDataProperty String.

Returns:
The objectDataProperty to be used or null if not set

getLocale

public java.util.Locale getLocale()
Get the locale

Overrides:
getLocale in class BaseBodyTag
Returns:
The Locale object

initialize

protected void initialize(boolean includeAttributes)
Initializes attributes and variables for this tag handler.

Overrides:
initialize in class BaseBodyTag
Parameters:
includeAttributes - Set to true if attributes are to be set to default values.

applyAttributes

protected void applyAttributes()
                        throws javax.servlet.jsp.JspException
Sets the basic attributes (request,name,prolog,epilog) common to all Transformation Beans.

Overrides:
applyAttributes in class BaseBodyTag
Parameters:
baseTag - Any class which extends TransformationInterface is valid
Throws:
javax.servlet.jsp.JspException - Thrown if a JspException occurs.

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
This Method Overrides the javax.servlet.jsp.tagext.TagSupport doStartTag Method. An instance of the wrapped class is loaded from the PageContext or created if it can not be found if the instantiate is true.

Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doStartTag in class BaseBodyTag
Returns:
The doStart int return code.
Throws:
javax.servlet.jsp.JspException - Thrown if a JspException occurs.
See Also:
BaseBodyTag.setInstantiate(boolean), TagSupport.doStartTag()

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException
This Method Overrides the javax.servlet.jsp.tagext.TagSupport doEndTag Method.

Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doEndTag in class javax.servlet.jsp.tagext.BodyTagSupport
Returns:
The doStart int return code.
Throws:
javax.servlet.jsp.JspException - Thrown if a JspException occurs.
See Also:
TagSupport.doEndTag(), BaseBodyTag.setInstantiate(boolean)



Copyright © 2009 SAS Institute Inc. All Rights Reserved.