# com.bea.wlw.netui.tags
AbstractBaseTag Class

public abstract class AbstractBaseTag
extends `BodyTagSupport`

Abstract tag class that most netui tags are based from. AbstractBaseTag provides the following functionality:

- Error registration and display
- NetUI Expression handling
- Base attribute rendering

Hierarchy
  `Object`
  `TagSupport`
  `BodyTagSupport`
  `AbstractBaseTag`

All Implemented Interfaces
  `BodyTag`, `IterationTag`, `Serializable`, `Tag`

Direct Known Subclasses
  `AbstractCallMethod`, `Anchor`, `Attribute`, `Base`, `BindingUpdateErrors`, `Button`, `CheckBoxOption`, `Content`, `DataSourceTag`, `DeclareBundle`, `DeclareControl`, `DeclarePageInput`, `Error`, `Errors`, `Form`, `FormatTag`, `GetData`, `GetNetuiTagName`, `Image`, `ImageButton`, `IncludeSection`, `Label`, `Message`, `MessageArg`, `MethodParameter`, `Node`, `Parameter`, `ParameterMap`, `RadioButtonOption`, `RewriteName`, `RewriteURL`, `ScriptContainer`, `Section`, `SelectOption`, `SetAttribute`, `StructuredBaseTag`, `Template`, `Visible`

## Field Summary

`protected static final int` | `ATTR_GENERAL` int
`protected static final int` | `ATTR_GENERAL_EXPRESSION` int
`protected static final int` | `ATTR_JAVASCRIPT` int
`protected static final int` | `ATTR_STYLE` int
`protected static final `String`` | `CLASS` String
`protected static final `String`` | `ID` String
`public static final `String`` | `JAVASCRIPT_STATUS` String
`protected static final `String`` | `NAME` String
`public static final `String`` | `NETUI_UNIQUE_CNT` String
`protected static final `String`` | `ONCLICK` String
`protected static final `String`` | `ONDBLCLICK` String
`protected static final `String`` | `ONKEYDOWN` String
`protected static final `String`` | `ONKEYPRESS` String
`protected static final `String`` | `ONKEYUP` String
`protected static final `String`` | `ONMOUSEDOWN` String
`protected static final `String`` | `ONMOUSEMOVE` String
`protected static final `String`` | `ONMOUSEOUT` String
`protected static final `String`` | `ONMOUSEOVER` String
`protected static final `String`` | `ONMOUSEUP` String
`protected static final `String`` | `STYLE` String
`protected static final `String`` | `TABINDEX` String

Fields from javax.servlet.jsp.tagext`.`BodyTagSupport``
`bodyContent`

Fields from javax.servlet.jsp.tagext`.`TagSupport``
`id, pageContext`

Fields from interface javax.servlet.jsp.tagext`.`BodyTag``
`EVAL_BODY_BUFFERED, EVAL_BODY_TAG`

Fields from interface javax.servlet.jsp.tagext`.`IterationTag``
`EVAL_BODY_AGAIN`

Fields from interface javax.servlet.jsp.tagext`.`Tag``
`EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE`

## Constructor Summary

AbstractBaseTag()

## Method Summary

`protected `String`` | `addTagIdMapping`(`String` tagId, `String` value) This method will add a tagId and value to the ScriptRepoter TagId map.
`protected `String`` | `evaluateAttributeToString`(`String` expression, `String` attrName) This method will evaluate an attribute and return the real value or `null`.
`protected final `String`` | `filter`(`String` value)
`protected `String`` | `filter`(`String` value, boolean markupHTMLSpaceReturn) Filter the specified string for characters that are senstive to HTML interpreters, returning the string with these characters replaced by the corresponding character entities.
`protected `JavaScriptUtils`` | `getJavaScriptUtils`(`HttpServletRequest` request) This method will return the `javaScriptUtils` that is assocated with this request.
`public `Form`` | `getNearestForm`() Returns the closest parent form tag, or null if there is none.
`protected `ScriptReporter`` | `getScriptReporter`()
`public abstract `String`` | `getTagName`()
`protected `Locale`` | `getUserLocale`()
`protected void` | `localRelease`() This is a method that will initialize all temp state on a tag and should be called in the doEndTag method.
`public `String`` | `registerTagError`(`String` message) This will report an error from a tag.
`public void` | `release`()
`protected final void` | `renderAttribute`(`UnsyncStringBuffer` buf, `String` name, `String` value) This method will write append an attribute value to a StringBuffer.
`protected `String`` | `rewriteName`(`String` name) This method will rewrite the name (id) by passing it to the URL Rewritter and getting back a value.
`protected final void` | `write`(`String` string) This mehod will write the passed string to the response.

Methods from `javax.servlet.jsp.tagext.`BodyTagSupport``
`doAfterBody, doEndTag, doInitBody, doStartTag, getBodyContent, getPreviousOut, setBodyContent`

Methods from `javax.servlet.jsp.tagext.`TagSupport``
`doAfterBody, doEndTag, doStartTag, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue`

Methods from class `java.lang.`Object``
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods from interface `javax.servlet.jsp.tagext.`BodyTag``
`doInitBody, setBodyContent`

Methods from interface `javax.servlet.jsp.tagext.`IterationTag``
`doAfterBody`

Methods from interface `javax.servlet.jsp.tagext.`Tag``
`doEndTag, doStartTag, getParent, release, setPageContext, setParent`

## Field Detail

### ATTR_GENERAL

    protected static final int ATTR_GENERAL

### ATTR_GENERAL_EXPRESSION

    protected static final int ATTR_GENERAL_EXPRESSION

### ATTR_JAVASCRIPT

    protected static final int ATTR_JAVASCRIPT

### ATTR_STYLE

    protected static final int ATTR_STYLE

### CLASS

    protected static final String CLASS

### ID

    protected static final String ID

### JAVASCRIPT_STATUS

    public static final String JAVASCRIPT_STATUS

### NAME

    protected static final String NAME

### NETUI_UNIQUE_CNT

    public static final String NETUI_UNIQUE_CNT

### ONCLICK

    protected static final String ONCLICK

### ONDBLCLICK

    protected static final String ONDBLCLICK

### ONKEYDOWN

    protected static final String ONKEYDOWN

### ONKEYPRESS

    protected static final String ONKEYPRESS

### ONKEYUP

    protected static final String ONKEYUP

### ONMOUSEDOWN

    protected static final String ONMOUSEDOWN

### ONMOUSEMOVE

    protected static final String ONMOUSEMOVE

### ONMOUSEOUT

    protected static final String ONMOUSEOUT

### ONMOUSEOVER

    protected static final String ONMOUSEOVER

### ONMOUSEUP

    protected static final String ONMOUSEUP

### STYLE

    protected static final String STYLE

### TABINDEX

    protected static final String TABINDEX

## Constructor Detail

### AbstractBaseTag

    public AbstractBaseTag()

## Method Detail

### addTagIdMapping(String, String) Method

    protected String addTagIdMapping(String tagId,
                                     String value)

This method will add a tagId and value to the ScriptRepoter TagId map. The a ScriptContainer tag will create a JavaScript table that allows the container, such as a portal, to rewrite the id so it's unique. The real name may be looked up based upon the tagId. If the no ScriptReporter is found, a script string will be returned to the caller so they can output the script block.

### evaluateAttributeToString(String, String) Method

    protected String evaluateAttributeToString(String expression,
                                               String attrName)

This method will evaluate an attribute and return the real value or `null`. If the attribute contains an expression the expression will be evaluted and the object found returned as a `String`. If the attributres contains an expression and doesn't return a value then `null` will be returned. if the attribute doesn't contain an expresion it will be returned unchanged.

### filter(String) Method

    protected final String filter(String value)

### filter(String, boolean) Method

    protected String filter(String value,
                            boolean markupHTMLSpaceReturn)

Filter the specified string for characters that are senstive to HTML interpreters, returning the string with these characters replaced by the corresponding character entities.

#### Parameters

value
  The string to be filtered and returned

markupHTMLSpaceReturn
  convert space characters and return characters to &nbsp; and <br /> marketup for html.

### getJavaScriptUtils(HttpServletRequest) Method

    protected JavaScriptUtils getJavaScriptUtils(HttpServletRequest request)

This method will return the `javaScriptUtils` that is assocated with this request. If this doesn't exist, it will be created before it is returned.

#### Parameters

request
  the HttpServletRequest associated with this request

#### Returns

a `JavaScriptUtils` assocated with the request

### getNearestForm() Method

    public Form getNearestForm()

Returns the closest parent form tag, or null if there is none.

### getScriptReporter() Method

    protected ScriptReporter getScriptReporter()

### getTagName() Method

    public abstract String getTagName()

### getUserLocale() Method

    protected Locale getUserLocale()

#### Returns

the Locale object to use when rendering this tag

### localRelease() Method

    protected void localRelease()

This is a method that will initialize all temp state on a tag and should be called in the doEndTag method.

### registerTagError(String) Method

    public String registerTagError(String message)

This will report an error from a tag. The error will contain a message. If error reporting is turned off, the message will be returned and the caller should throw a JspException to report the error.

#### Parameters

message
  - the message to register with the error

#### Returns

null

### release() Method

    public void release()

Overrides
  `BodyTagSupport.release()`

### renderAttribute(UnsyncStringBuffer, String, String) Method

    protected final void renderAttribute(UnsyncStringBuffer buf,
                                         String name,
                                         String value)

This method will write append an attribute value to a StringBuffer. The method assumes that the attr is not `null`. If the value is `null` the attribute will not be appended to the `StringBuffer`.

### rewriteName(String) Method

    protected String rewriteName(String name)

This method will rewrite the name (id) by passing it to the URL Rewritter and getting back a value.

### write(String) Method

    protected final void write(String string)

This mehod will write the passed string to the response.

#### Parameters

string
  to be written to the response.