# <netui:rewriteName> Tag

Allows a name, typically either an `id` or `name` attribute, to participate in name rewritting.

## Syntax

<netui:rewriteName
name="string_name"
[resultId="string_resultId"] />

## Description

Allows a name, typically either an `id` or `name` attribute, to participate in name rewritting. Some containers such as WebLogic Portal rewrite name attributes so they are unique.

## Attributes

name | 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'.
Required | Supports runtime expression evaluation | Data bindable
Yes | Yes | No
resultId | A name that will cause the real name to be stored into the page context under this name.
Required | Supports runtime expression evaluation | Data bindable
No | No | No

## Sample

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 render <span name="scope1_foo"> instead of <span name="foo">. 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/

## Related Topics

<netui:rewrite...> Tag Samples

<netui:rewriteURL> Tag