org.apache.beehive.netui.tags.html
Class RewriteURL
Object
TagSupport
BodyTagSupport
AbstractClassicTag
RewriteURL
- All Implemented Interfaces:
- Serializable, BodyTag, IterationTag, JspTag, Tag, IUrlParams, INetuiTag
public class RewriteURL
- extends AbstractClassicTag
- implements IUrlParams
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, the id attribute of a <span> tag is set to 'foo'. The
actual value that will be written to the rendered HTML may change depending
on the application container. (Portal containers sometimes rewrite the id attributes
to ensure their uniqueness.) But the value 'foo' can be passed to
getNetuiTagName( tagId, tag )
to find the
value of the id attribute actually rendered in the browser.
<span id="<netui:rewriteURL URL="foo"/>">
Field Summary |
protected String |
url
|
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 |
void |
addParameter(String name,
Object value,
String facet)
This method will allow a tag that produces one or more Urls to have parameters set
on the tag. |
int |
doStartTag()
Add the URL parameter to the Parameter's parent. |
String |
getTagName()
Return the name of the Tag. |
protected void |
localRelease()
Release any acquired resources. |
void |
setURL(String url)
Sets the name to be rewritten. |
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 |
url
protected String url
RewriteURL
public RewriteURL()
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.
setURL
public void setURL(String url)
- Sets the name to be rewritten.
- Parameters:
url
- - the parameter name.
addParameter
public void addParameter(String name,
Object value,
String facet)
throws JspException
- This method will allow a tag that produces one or more Urls to have parameters set
on the tag. The name and value should be required. The facet is optional, and
allows tags producing more than one URL to have parameters set on different URLs.
- Specified by:
addParameter
in interface IUrlParams
- Parameters:
name
- The name of the parameter to be added to the URL.value
- The value of the parameter.facet
- The name of a facet for which the parameter should be added.
- Throws:
JspException
doStartTag
public int doStartTag()
throws JspException
- Add the URL parameter to the Parameter's parent.
- 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