|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.taglib.BaseTag
public class BaseTag
The base object for all tag handlers in the SAS Custom Tag Library which do not have a body.
Field Summary | |
---|---|
static java.lang.String |
APPLICATION
String representation of "application" for conversion to javax.servlet.jsp.PageContext.APPLICATION_SCOPE |
static java.lang.String |
PAGE
String representation of "page" for conversion to javax.servlet.jsp.PageContext.PAGE_SCOPE |
static java.lang.String |
RB_KEY
Static key for referencing the Internationalization Strings for this class |
static java.lang.String |
REQUEST
String representation of "request" for conversion to javax.servlet.jsp.PageContext.REQUEST_SCOPE |
static java.lang.String |
SESSION
String representation of "session" for conversion to javax.servlet.jsp.PageContext.SESSION_SCOPE |
Constructor Summary | |
---|---|
BaseTag()
Constructor for BaseTag. |
Method Summary | |
---|---|
protected void |
applyAttributes()
Called by the doStartTag method to set any variables or methods in the wrapped class. |
static int |
convertScope(java.util.Locale theLocale,
java.lang.String scope)
Used to convert the string version of the scope to a javax.servlet.jsp.PageContext reference. |
void |
doCatch(java.lang.Throwable t)
This method implements the javax.servlet.jsp.tagext.TryCatchFinally doCatch method. |
void |
doFinally()
This method implements the javax.servlet.jsp.tagext.TryCatchFinally doFinally method. |
int |
doStartTag()
This Method Overrides the javax.servlet.jsp.tagext.TagSupport doStartTag Method. |
protected boolean |
getApplyAttributes()
If a class is loaded from the page context from the ID it is not necessary to reapply the attributes. |
static java.lang.Object |
getComponentFromParentComposite(java.lang.String key,
BaseBodyTag parent)
Gets the component underlying object based on the composite key. |
protected java.lang.String |
getCompositeComponentKey()
Gets the compositeComponentKey property. |
boolean |
getInstantiate()
Indicates whether or not the wrapped class should be instantiated if a suitable object is not found in the PageContext. |
java.util.Locale |
getLocale()
Get the locale |
protected javax.servlet.jsp.PageContext |
getPageContext()
This method is here simply as a place holder and to provide consistency with the Bean specification. |
java.lang.String |
getRef()
Returns the reference variable name that should be used to instantiate the custom tag. |
java.lang.String |
getScope()
Returns the string representation of the Tag's scope. |
int |
getTagScope()
This method is in place simply as a place holder. |
java.lang.String |
getWrappedClassName()
Gets the name of the class being wrapped by the custom tag. |
java.lang.Object |
getWrappedObject()
Gets an object instance of the class being wrapped by the custom tag. |
java.lang.Object |
getWrappedObject(boolean forceCreation)
Gets an object instance of the class being wrapped by the custom tag. |
protected void |
initialize(boolean includeAttributes)
This method is used to initialize attributes and variables at various time during the tag handler lifecycle. |
void |
loadBeanInstance()
Loads an instance of the specified transformation bean (or class). |
java.lang.Object |
newInstance()
Creates a new instance of the wrapped class. |
void |
release()
This method overrides the javax.servlet.jsp.tagext.TagSupport release method. |
void |
removeFromScope()
If the "id" or "ref" are not null the tag will be removed from PageContext if it exists within the tag's specified scope. |
java.lang.Object |
searchContext(java.lang.String var)
Searches the PageContext for the specified attribute. |
protected void |
setApplyAttributes(boolean applyAttributes)
If a class is loaded from the page context from the ID it is not necessary to reapply the attributes. |
static void |
setComponentOnParentComposite(java.lang.Object wrappedObject,
java.lang.String key,
BaseBodyTag parent)
Sets the component underlying object based on the composite key. |
protected void |
setCompositeComponentKey(java.lang.String compositeComponentKey)
Sets the compositeComponentKey property. |
void |
setInstantiate(boolean instantiate)
Sets the instantiate property (boolean) from a tag attribute. |
void |
setLocale(java.util.Locale loc)
Set the locale |
void |
setRef(java.lang.String ref)
Sets the ref property (String) from a tag attribute. |
void |
setScope(java.lang.String scope)
Sets the scope property (int) from a tag attribute. |
void |
setTagScope(int tagScope)
This method is in place simply as a place holder. |
void |
setVariableWithinScope()
If "id" is not null the tag will be added to the PageContext with tag's scope. |
void |
setWrappedClassName(java.lang.String wrappedClassName)
Sets the name of the class being wrapped by the custom tag. |
void |
setWrappedObject(java.lang.Object wrappedObject)
Sets an object instance of the class being wrapped by the custom tag. |
void |
validate(java.lang.Object obj,
java.lang.String item)
Validates whether or not an attribute is null. |
Field Detail |
---|
public static final java.lang.String RB_KEY
public static final java.lang.String PAGE
public static final java.lang.String REQUEST
public static final java.lang.String SESSION
public static final java.lang.String APPLICATION
Constructor Detail |
---|
public BaseTag()
Method Detail |
---|
protected void setCompositeComponentKey(java.lang.String compositeComponentKey)
compositeComponentKey
- Sets the composite component key to set the underlying object on the parent objectpublic void setInstantiate(boolean instantiate)
instantiate
- Flag that, if true, indicates that a new instance of the underlying class should be loaded if one cannot be found in PageContext. Must be used with an id attribute.public void setLocale(java.util.Locale loc)
locale
- Specifies the locale to use for this instance of the class.protected void setApplyAttributes(boolean applyAttributes)
applyAttributes
- Flag that, if true, indicates that the attributes of the bean should be modified.public void setRef(java.lang.String ref)
ref
- The variable String value that represents an object created earlier in the same scope.public void setScope(java.lang.String scope)
scope
- The scope (or page context) within which the reference is available.public static int convertScope(java.util.Locale theLocale, java.lang.String scope)
theLocale
- Specifies the locale to use for this instance of the class.scope
- The scope (or page context) within which the reference is available.
public final void setTagScope(int tagScope)
tagScope
- An int value that represents the PageContext Scope for the tag.protected java.lang.String getCompositeComponentKey()
public boolean getInstantiate()
public java.util.Locale getLocale()
protected final boolean getApplyAttributes()
protected javax.servlet.jsp.PageContext getPageContext()
public java.lang.String getRef()
public java.lang.String getScope()
public final int getTagScope()
protected void initialize(boolean includeAttributes)
includeAttributes
- Set to true if attributes are to be set to default values.public void loadBeanInstance()
public void removeFromScope()
public java.lang.Object searchContext(java.lang.String var)
var
- the attribute to search for
public void setVariableWithinScope()
public void validate(java.lang.Object obj, java.lang.String item) throws java.lang.IllegalArgumentException
obj
- The attribute to be testeditem
- The name of the attribute being tested
java.lang.IllegalArgumentException
- Thrown if obj was null.protected void applyAttributes() throws javax.servlet.jsp.JspException
javax.servlet.jsp.JspException
- Thrown if a JspException occurs.public void setWrappedClassName(java.lang.String wrappedClassName)
wrappedClassName
- the name of the class being wrappedpublic void setWrappedObject(java.lang.Object wrappedObject)
wrappedObject
- an instance of the wrapped classpublic java.lang.String getWrappedClassName()
public java.lang.Object getWrappedObject() throws javax.servlet.jsp.JspException
javax.servlet.jsp.JspException
- Thrown if a JspException occurs.public java.lang.Object getWrappedObject(boolean forceCreation) throws javax.servlet.jsp.JspException
forceCreation
- create an instance of the wrapped class if one can not be found in the PageContext
javax.servlet.jsp.JspException
- Thrown if a JspException occurs.public java.lang.Object newInstance() throws javax.servlet.jsp.JspException
javax.servlet.jsp.JspException
- Thrown if a JspException occurs.setWrappedObject(java.lang.Object)
,
getWrappedObject()
public static void setComponentOnParentComposite(java.lang.Object wrappedObject, java.lang.String key, BaseBodyTag parent)
wrappedObject
- Object to set on parent's underlying wrapped objectkey
- The parent's composite keyparent
- The parent tagpublic static java.lang.Object getComponentFromParentComposite(java.lang.String key, BaseBodyTag parent)
key
- The parent's composite keyparent
- The parent tag
public int doStartTag() throws javax.servlet.jsp.JspException
doStartTag
in interface javax.servlet.jsp.tagext.Tag
doStartTag
in class javax.servlet.jsp.tagext.TagSupport
javax.servlet.jsp.JspException
- Thrown if a JspException occurs.setInstantiate(boolean)
,
TagSupport.doStartTag()
public void doCatch(java.lang.Throwable t) throws java.lang.Throwable
doCatch
in interface javax.servlet.jsp.tagext.TryCatchFinally
t
- The Throwable which was caught in this tag's lifecycle.
java.lang.Throwable
- Thrown if a Throwable occurs. The Throwable is rethrown.TryCatchFinally.doCatch(java.lang.Throwable)
public void doFinally()
doFinally
in interface javax.servlet.jsp.tagext.TryCatchFinally
TryCatchFinally.doFinally()
public void release()
release
in interface javax.servlet.jsp.tagext.Tag
release
in class javax.servlet.jsp.tagext.TagSupport
TagSupport.release()
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |