org.apache.beehive.netui.tags.html
Class RewriteName
Object
TagSupport
BodyTagSupport
AbstractClassicTag
RewriteName
- All Implemented Interfaces:
- Serializable, BodyTag, IterationTag, JspTag, Tag, INetuiTag
public class RewriteName
- extends AbstractClassicTag
Allow a name, typically either an id
or name
attribute, to participate in URL
rewritting. Some containers such as WebLogic Portal rewrite names so they are unique.
This tag will cause the name to be made available from getNetuiTagName
JavaScript, which is output from the <netui:html> tag.
- See Also:
- Serialized Form
- Example
- In this sample, we are settting the id attribute of the span tag to 'foo'. The
actual value that will be rendered in the HTML may change depending on the
container where the web application resides. For example, a Portal container may change
render <span name="scope1_foo"> instead of <span name="scope1_foo">.
But the value 'foo' can be passed to
getNetuiTagName( tagId, tag )
to find the rendered
value of the name attribute.
<span id="<netui:rewriteName name="foo"/>">
Fields inherited from class BodyTagSupport |
bodyContent |
Fields inherited from class TagSupport |
id, pageContext |
Fields inherited from interface BodyTag |
EVAL_BODY_BUFFERED, EVAL_BODY_TAG |
Fields inherited from interface IterationTag |
EVAL_BODY_AGAIN |
Fields inherited from interface Tag |
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE |
Method Summary |
int |
doStartTag()
Pass the name attribute to the URLRewriter and output the
returned value. |
String |
getTagName()
Return the name of the Tag. |
protected void |
localRelease()
Release any acquired resources. |
void |
setName(String name)
Sets the name to be rewritten. |
void |
setResultId(String resultId)
Sets the resultId which, if non-null, will store the real name
in the page context under the resultId name; |
Methods inherited from class AbstractClassicTag |
applyNamingChain, getErrorsReport, getIdForTagId, getNamingChain, getNextId, getScriptReporter, getUserLocale, hasErrors, qualifyAttribute, registerTagError, registerTagError, reportAndExit, reportErrors, rewriteName, setNonEmptyValueAttribute, setRequiredValueAttribute, write |
Methods inherited from class BodyTagSupport |
doAfterBody, doEndTag, doInitBody, getBodyContent, getPreviousOut, release, setBodyContent |
Methods inherited from class TagSupport |
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue |
Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface Tag |
getParent, setPageContext, setParent |
RewriteName
public RewriteName()
getTagName
public String getTagName()
- Return the name of the Tag.
- Specified by:
getTagName
in interface INetuiTag
- Specified by:
getTagName
in class AbstractClassicTag
- Returns:
- the name of the tag.
setName
public void setName(String name)
- Sets the name to be rewritten.
- Parameters:
name
- - the parameter name.
setResultId
public void setResultId(String resultId)
- Sets the resultId which, if non-null, will store the real name
in the page context under the resultId name;
- Parameters:
resultId
- - the parameter name.
doStartTag
public int doStartTag()
throws JspException
- Pass the name attribute to the URLRewriter and output the
returned value. Updates the HTML tag to output the mapping.
- Specified by:
doStartTag
in interface Tag
- Overrides:
doStartTag
in class BodyTagSupport
- Throws:
JspException
- if a JSP exception has occurred
localRelease
protected void localRelease()
- Release any acquired resources.
- Overrides:
localRelease
in class AbstractClassicTag