Class ApplyDecoratorTag
java.lang.Object
jakarta.servlet.jsp.tagext.TagSupport
jakarta.servlet.jsp.tagext.BodyTagSupport
com.opensymphony.module.sitemesh.taglib.page.ApplyDecoratorTag
- All Implemented Interfaces:
RequestConstants,jakarta.servlet.jsp.tagext.BodyTag,jakarta.servlet.jsp.tagext.IterationTag,jakarta.servlet.jsp.tagext.JspTag,jakarta.servlet.jsp.tagext.Tag,Serializable
public class ApplyDecoratorTag
extends jakarta.servlet.jsp.tagext.BodyTagSupport
implements RequestConstants
This tag inserts an external resource as a panel into the current Page.
The page attribute should point to the panel resource which should expose an entire page (e.g. another JSP file producing HTML). This attribute can be relative to the page it is being called from or an absolute path from the context-root.
OR
If the page attribute is not specified, the body content is parsed
into the Page object and has
the Decorator applied.
The (optional) decorator attribute is the name of the
Decorator
to apply to the included page. Note that the implementation of
DecoratorMapper can overide this.
- Version:
- $Revision: 1.5 $
- Author:
- Joe Walnes
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Configprivate Stringprivate Stringprivate DecoratorMapperprivate Stringprivate Stringprivate MapFields inherited from class jakarta.servlet.jsp.tagext.BodyTagSupport
bodyContentFields inherited from class jakarta.servlet.jsp.tagext.TagSupport
id, pageContextFields inherited from interface jakarta.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFEREDFields inherited from interface jakarta.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAINFields inherited from interface com.opensymphony.module.sitemesh.RequestConstants
DECORATOR, FILTER_APPLIED, PAGE, ROBOT, USING_STREAMFields inherited from interface jakarta.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voidAdd a parameter to the page.intEnsure that external page contents are included in bodycontent.intdoEndTag()Standard taglib method: apply decorator to page.intvoidrelease()Release all attributesvoidsetContentType(String contentType) voidsetDecorator(String decorator) Deprecated.Use setName() instead.voidsetEncoding(String encoding) voidTag attribute: If set, this value will override the 'id' property of the page.voidTag attribute: Name of Decorator to apply to Page.voidTag attribute: URI of page to include.voidTag attribute: If set, this value will override the 'title' property of the page.static voidLog exception generated by taglib.Methods inherited from class jakarta.servlet.jsp.tagext.BodyTagSupport
doInitBody, getBodyContent, getPreviousOut, setBodyContentMethods inherited from class jakarta.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setPageContext, setParent, setValueMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface jakarta.servlet.jsp.tagext.Tag
getParent, setPageContext, setParent
-
Field Details
-
page
-
decorator
-
contentType
-
encoding
-
params
-
config
-
decoratorMapper
-
-
Constructor Details
-
ApplyDecoratorTag
public ApplyDecoratorTag()
-
-
Method Details
-
setPage
Tag attribute: URI of page to include. Can be relative to page being called from, or absolute path from context-root of web-app. -
addParam
Add a parameter to the page. This has a package level access modifier so ParamTag can also call it. -
setTitle
Tag attribute: If set, this value will override the 'title' property of the page. This is a convenience utility and is identical to specifing a 'page:param name=title' tag. -
setId
Tag attribute: If set, this value will override the 'id' property of the page. This is a convenience utility and is identical to specifing a 'page:param name=id' tag.- Overrides:
setIdin classjakarta.servlet.jsp.tagext.TagSupport
-
setName
Tag attribute: Name of Decorator to apply to Page. This is passed to DecoratorMapper to retrieve appropriate Decorator. DecoratorMapper may override if needed.- See Also:
-
setDecorator
Deprecated.Use setName() instead. -
setContentType
-
setEncoding
-
doStartTag
public int doStartTag()- Specified by:
doStartTagin interfacejakarta.servlet.jsp.tagext.Tag- Overrides:
doStartTagin classjakarta.servlet.jsp.tagext.BodyTagSupport
-
doAfterBody
public int doAfterBody() throws jakarta.servlet.jsp.JspExceptionEnsure that external page contents are included in bodycontent.- Specified by:
doAfterBodyin interfacejakarta.servlet.jsp.tagext.IterationTag- Overrides:
doAfterBodyin classjakarta.servlet.jsp.tagext.BodyTagSupport- Throws:
jakarta.servlet.jsp.JspException
-
doEndTag
public int doEndTag() throws jakarta.servlet.jsp.JspExceptionStandard taglib method: apply decorator to page.- Specified by:
doEndTagin interfacejakarta.servlet.jsp.tagext.Tag- Overrides:
doEndTagin classjakarta.servlet.jsp.tagext.BodyTagSupport- Throws:
jakarta.servlet.jsp.JspException
-
release
public void release()Release all attributes- Specified by:
releasein interfacejakarta.servlet.jsp.tagext.Tag- Overrides:
releasein classjakarta.servlet.jsp.tagext.BodyTagSupport
-
trace
Log exception generated by taglib.
-