|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.servlet.jsp.tagext.TagSupport
com.boylesoftware.cb2.presentation.servlet.InsertTag
Implementation of the <cb2:insert>
JSP tag. This tag
inserts a component or a page attribtue value, which may be configured
for the page in the pages-config.xml
file. The input for
this tag is a name of a component reference or a page attribute. The
name can be specified statically right in the tag instance using
name
attribute, or it can be provided as a bean property
named by nameProperty
and nameBean
attributes.
The tag looks up the bean using PageContext.findAttribute
method. If only nameProperty
is specified and no
nameBean
, then an attribute with the specified by the
attribute name is assumed to be a String
and is used as
the component reference or page attribute name.
This tag works in tight conjunction with the
ShowPageAction
action handler.
Field Summary |
Fields inherited from class javax.servlet.jsp.tagext.TagSupport |
id, pageContext |
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag |
EVAL_BODY_AGAIN |
Fields inherited from interface javax.servlet.jsp.tagext.Tag |
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE |
Constructor Summary | |
InsertTag()
|
Method Summary | |
int |
doEndTag()
Does the actual job at the tag's end preparing required beans in the page context and inserting the content. |
int |
doStartTag()
This implementation just skips the tag's whole body doing nothing. |
boolean |
getIgnoreIfAbsent()
Gets the ignoreIfAbsent attribute for the tag. |
java.lang.String |
getName()
Gets the name of the component reference or the attribute as it is configured by componentref or
attribute element in the configuration file. |
java.lang.String |
getNameBean()
Gets the name of the bean containing component reference or page attribute name. |
java.lang.String |
getNameProperty()
Gets name of the property in the nameBean bean
containing component reference or page attribute name. |
void |
release()
Release the tag. |
void |
setIgnoreIfAbsent(boolean ignoreIfAbsent)
Sets the ignoreIfAbsent attribute for the tag. |
void |
setName(java.lang.String name)
Sets the name of the component reference or the attribute as it is configured by componentref or
attribute element in the configuration file. |
void |
setNameBean(java.lang.String nameBean)
Sets the name of the bean containing component reference or page attribute name. |
void |
setNameProperty(java.lang.String nameProperty)
Sets name of the property in the nameBean bean
containing component reference or page attribute name. |
Methods inherited from class javax.servlet.jsp.tagext.TagSupport |
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public InsertTag()
Method Detail |
public java.lang.String getName()
componentref
or
attribute
element in the configuration file.
public void setName(java.lang.String name)
componentref
or
attribute
element in the configuration file.
name
- the componentref or attribute name.public java.lang.String getNameBean()
public void setNameBean(java.lang.String nameBean)
nameBean
- the bean name.public java.lang.String getNameProperty()
nameBean
bean
containing component reference or page attribute name.
public void setNameProperty(java.lang.String nameProperty)
nameBean
bean
containing component reference or page attribute name.
nameProperty
- the property name.public boolean getIgnoreIfAbsent()
ignoreIfAbsent
attribute for the tag.
true
if ignoreIfAbsent
flag
is set.public void setIgnoreIfAbsent(boolean ignoreIfAbsent)
ignoreIfAbsent
attribute for the tag.
If set to true
the tag will be ignored if no component
nor attribute with the specified name is defined for the page.
If set to false
, which is the default, an exception
will be thrown in such a case.
ignoreIfAbsent
- value for the ignoreIfAbsent
attribute.public int doStartTag()
doEndTag
method.
Tag.SKIP_BODY
.public int doEndTag() throws javax.servlet.jsp.JspException
Tag.EVAL_PAGE
.
javax.servlet.jsp.JspException
- if an error occured.public void release()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |