BEA NetUI tags and APIs are included for backward compatibility only. For new applications, use the Beehive tags and APIs.

com.bea.wlw.netui.tags.html
Class RewriteName

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by javax.servlet.jsp.tagext.BodyTagSupport
          extended by com.bea.wlw.netui.tags.AbstractBaseTag
              extended by com.bea.wlw.netui.tags.html.RewriteName
All Implemented Interfaces:
HtmlConstants, Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

public class RewriteName
extends AbstractBaseTag

Allow a tag 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 the getNetuiTagName( tagId, tag ) JavaScript function (which is written to the page by the <netui:html> tag).

Attribute Descriptions
AttributeRequiredRuntime Expression Evaluation Data Bindable
nameYesNoNo
The value of the name which will be rewritten. The real name will be output and may be looked up using 'name'.
resultIdNoNoNo
A name that will cause the real name to be stored into the page context under this name.

See Also:
RewriteURL, 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"/>">

Sample Code

[BEA_HOME]/weblogic81/samples/workshop/SamplesApp/WebApp/tagSamples/netui/rewrite/

Beadoc.see:
<netui:rewrite...> Tag Samples
Beadoc.tagdescription:
Allows a name, typically either an id or name attribute, to participate in URL rewritting. Some containers such as WebLogic Portal rewrite name attributes so they are unique. This tag will cause the name to be made available from the getNetuiTagName( tagId, tag ) JavaScript function.

Field Summary
 
Fields inherited from class com.bea.wlw.netui.tags.AbstractBaseTag
ATTR_GENERAL, ATTR_GENERAL_EXPRESSION, ATTR_JAVASCRIPT, ATTR_STYLE, JAVASCRIPT_STATUS, NETUI_UNIQUE_CNT
 
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport
bodyContent
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface com.bea.wlw.netui.tags.html.HtmlConstants
ACCEPT, ACCESSKEY, ACTION, ALIGN, ALINK, ALT, ANCHOR, BACKGROUND, BASE, BGCOLOR, BODY, BORDER, BR, CAPTION, CELLPADDING, CELLSPACING, CHAR, CHAROFF, CHARSET, CHECKED, CLASS, COLS, COORDS, DIR, DISABLED, DIV, ENCTYPE, FOR, FORM, FORM_GET, FORM_POST, FRAME, HEIGHT, HREF, HREFLANG, HSPACE, HTML, ID, IMAGE, INPUT, INPUT_BUTTON, INPUT_CHECKBOX, INPUT_FILE, INPUT_HIDDEN, INPUT_IMAGE, INPUT_PASSWORD, INPUT_RADIO, INPUT_RESET, INPUT_SUBMIT, INPUT_TEXT, ISMAP, LABEL, LANG, LINK, LONGDESC, MAXLENGTH, METHOD, NAME, ONBLUR, ONCHANGE, ONCLICK, ONDBLCLICK, ONFOCUS, ONKEYDOWN, ONKEYPRESS, ONKEYUP, ONLOAD, ONMOUSEDOWN, ONMOUSEMOVE, ONMOUSEOUT, ONMOUSEOVER, ONMOUSEUP, ONRESET, ONSELECT, ONSUBMIT, ONUNLOAD, OPTION, READONLY, REL, REV, ROWS, RULES, SELECT, SHAPE, SIZE, SPAN, SRC, STYLE, SUMMARY, TABINDEX, TABLE, TARGET, TD, TEXT, TEXTAREA, TITLE, TR, TYPE, USEMAP, VALIGN, VALUE, VLINK, VSPACE, WIDTH
 
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
 
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
RewriteName()
           
 
Method Summary
 int doStartTag()
          Pass the name attribute to the URLRewriter and output the returned value.
 String getName()
          Gets the name of that should be rewritten.
 String getResultId()
          Gets the resultId.
 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 com.bea.wlw.netui.tags.AbstractBaseTag
addTagIdMapping, containsExpression, evaluateAttributeToString, evaluateExpression, filter, filter, formatErrorString, formatString, getAttribute, getErrorsReport, getExpressionEvaluator, getJavaScriptUtils, getNearestForm, getNextId, getQualifiedBundleName, getScriptReporter, getUserLocale, hasErrors, isExpression, prepForRendering, registerAttribute, registerError, registerTagError, release, removeAttribute, renderAttribute, renderAttributes, reportErrors, rewriteName, setPageContext, updateExpression, write
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doAfterBody, doEndTag, doInitBody, getBodyContent, getPreviousOut, setBodyContent
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, setParent
 

Constructor Detail

RewriteName

public RewriteName()
Method Detail

getTagName

public String getTagName()
Return the name of the Tag.

Specified by:
getTagName in class AbstractBaseTag

getName

public String getName()
Gets the name of that should be rewritten.

Returns:
the parameter name.

setName

public void setName(String name)
Sets the name to be rewritten.

Parameters:
name - - the parameter name.
Beadoc.attributedescription:
The name which will be rewritten. This value will be output to the page rendered in the browser and may be looked up using 'name'.
Beadoc.attributesyntaxvalue:
string_name
Beadoc.databindable:
false

getResultId

public String getResultId()
Gets the resultId. This is the name that the real name that will be used to store the real name in the page context.

Returns:
the resultId

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.
Beadoc.attributedescription:
A name that will cause the real name to be stored into the page context under this name.
Beadoc.attributesyntaxvalue:
string_resultId
Beadoc.databindable:
false

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.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 javax.servlet.jsp.tagext.Tag
Overrides:
doStartTag in class javax.servlet.jsp.tagext.BodyTagSupport
Throws:
javax.servlet.jsp.JspException - if a JSP exception has occurred

localRelease

protected void localRelease()
Release any acquired resources.

Overrides:
localRelease in class AbstractBaseTag

BEA NetUI tags and APIs are included for backward compatibility only. For new applications, use the Beehive tags and APIs.