org.apache.struts2.views.jsp.ui

## Class AbstractUITag

- java.lang.Object
- - javax.servlet.jsp.tagext.TagSupport
  - - javax.servlet.jsp.tagext.BodyTagSupport
    - - org.apache.struts2.views.jsp.StrutsBodyTagSupport
      - - org.apache.struts2.views.jsp.ComponentTagSupport
        - - org.apache.struts2.views.jsp.ui.AbstractUITag

- All Implemented Interfaces:
    Serializable, javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.DynamicAttributes, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag
  Direct Known Subclasses:
    AbstractClosingTag, AbstractListTag, ActionErrorTag, ActionMessageTag, CheckboxTag, ComponentTag, DateTextFieldTag, DebugTag, FieldErrorTag, FileTag, HeadTag, HiddenTag, LabelTag, LinkTag, ResetTag, ScriptTag, TextareaTag, TextFieldTag, TokenTag

      public abstract class AbstractUITag
      extends ComponentTagSupport
      implements javax.servlet.jsp.tagext.DynamicAttributes

  Abstract base class for all UI tags.
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected String` | `accesskey`
    `protected String` | `cssClass`
    `protected String` | `cssErrorClass`
    `protected String` | `cssErrorStyle`
    `protected String` | `cssStyle`
    `protected String` | `disabled`
    `protected Map<String,String>` | `dynamicAttributes`
    `protected String` | `errorPosition`
    `protected String` | `id`
    `protected String` | `javascriptTooltip`
    `protected String` | `key`
    `protected String` | `label`
    `protected String` | `labelPosition`
    `protected String` | `labelSeparator`
    `protected String` | `name`
    `protected String` | `onblur`
    `protected String` | `onchange`
    `protected String` | `onclick`
    `protected String` | `ondblclick`
    `protected String` | `onfocus`
    `protected String` | `onkeydown`
    `protected String` | `onkeypress`
    `protected String` | `onkeyup`
    `protected String` | `onmousedown`
    `protected String` | `onmousemove`
    `protected String` | `onmouseout`
    `protected String` | `onmouseover`
    `protected String` | `onmouseup`
    `protected String` | `onselect`
    `protected String` | `requiredLabel`
    `protected String` | `requiredPosition`
    `protected String` | `tabindex`
    `protected String` | `template`
    `protected String` | `templateDir`
    `protected String` | `theme`
    `protected String` | `title`
    `protected String` | `tooltip`
    `protected String` | `tooltipConfig`
    `protected String` | `tooltipCssClass`
    `protected String` | `tooltipDelay`
    `protected String` | `tooltipIconPath`
    `protected String` | `value`

    - ### Fields inherited from class org.apache.struts2.views.jsp.ComponentTagSupport

      `component`

    - ### Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport

      `bodyContent`

    - ### Fields inherited from class javax.servlet.jsp.tagext.TagSupport

      `pageContext`

    - ### 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

    Constructors
    Constructor and Description
    `AbstractUITag()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `clearTagStateForTagPoolingServers()` Provide a mechanism to clear tag state, to handle servlet container JSP tag pooling behaviour with some servers, such as Glassfish.
    `protected void` | `populateParams()` Define method to populate component state based on the Tag parameters.
    `void` | `setAccesskey(String accesskey)`
    `void` | `setClass(String cssClass)` Deprecated. Use `setCssClass(String)` instead
    `void` | `setCssClass(String cssClass)`
    `void` | `setCssErrorClass(String cssErrorClass)`
    `void` | `setCssErrorStyle(String cssErrorStyle)`
    `void` | `setCssStyle(String cssStyle)`
    `void` | `setDisabled(String disabled)`
    `void` | `setDynamicAttribute(String uri, String localName, Object value)`
    `void` | `setErrorPosition(String errorPosition)`
    `void` | `setId(String id)`
    `void` | `setJavascriptTooltip(String javascriptTooltip)`
    `void` | `setKey(String key)`
    `void` | `setLabel(String label)`
    `void` | `setLabelPosition(String labelPosition)`
    `void` | `setLabelSeparator(String labelSeparator)`
    `void` | `setName(String name)`
    `void` | `setOnblur(String onblur)`
    `void` | `setOnchange(String onchange)`
    `void` | `setOnclick(String onclick)`
    `void` | `setOndblclick(String ondblclick)`
    `void` | `setOnfocus(String onfocus)`
    `void` | `setOnkeydown(String onkeydown)`
    `void` | `setOnkeypress(String onkeypress)`
    `void` | `setOnkeyup(String onkeyup)`
    `void` | `setOnmousedown(String onmousedown)`
    `void` | `setOnmousemove(String onmousemove)`
    `void` | `setOnmouseout(String onmouseout)`
    `void` | `setOnmouseover(String onmouseover)`
    `void` | `setOnmouseup(String onmouseup)`
    `void` | `setOnselect(String onselect)`
    `void` | `setPerformClearTagStateForTagPoolingServers(boolean performClearTagStateForTagPoolingServers)` Request that the tag state be cleared during `StrutsBodyTagSupport.doEndTag()` processing, which may help with certain edge cases with tag logic running on servers that implement JSP Tag Pooling.
    `void` | `setRequiredLabel(String requiredLabel)`
    `void` | `setRequiredPosition(String requiredPosition)`
    `void` | `setStyle(String cssStyle)`
    `void` | `setTabindex(String tabindex)`
    `void` | `setTemplate(String template)`
    `void` | `setTemplateDir(String templateDir)`
    `void` | `setTheme(String theme)`
    `void` | `setTitle(String title)`
    `void` | `setTooltip(String tooltip)`
    `void` | `setTooltipConfig(String tooltipConfig)`
    `void` | `setTooltipCssClass(String tooltipCssClass)`
    `void` | `setTooltipDelay(String tooltipDelay)`
    `void` | `setTooltipIconPath(String tooltipIconPath)`
    `void` | `setValue(String value)`

    - ### Methods inherited from class org.apache.struts2.views.jsp.ComponentTagSupport

      `doEndTag, doStartTag, getBean, getComponent, populatePerformClearTagStateForTagPoolingServersParam`

    - ### Methods inherited from class org.apache.struts2.views.jsp.StrutsBodyTagSupport

      `findString, findValue, findValue, getBody, getPerformClearTagStateForTagPoolingServers, getStack, release, toString`

    - ### Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport

      `doAfterBody, doInitBody, getBodyContent, getPreviousOut, setBodyContent`

    - ### Methods inherited from class javax.servlet.jsp.tagext.TagSupport

      `findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setPageContext, 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, setPageContext, setParent`

- - ### Field Detail

    - #### cssClass

          protected String cssClass

    - #### cssErrorClass

          protected String cssErrorClass

    - #### cssStyle

          protected String cssStyle

    - #### cssErrorStyle

          protected String cssErrorStyle

    - #### title

          protected String title

    - #### disabled

          protected String disabled

    - #### label

          protected String label

    - #### labelSeparator

          protected String labelSeparator

    - #### labelPosition

          protected String labelPosition

    - #### requiredPosition

          protected String requiredPosition

    - #### errorPosition

          protected String errorPosition

    - #### name

          protected String name

    - #### requiredLabel

          protected String requiredLabel

    - #### tabindex

          protected String tabindex

    - #### value

          protected String value

    - #### template

          protected String template

    - #### theme

          protected String theme

    - #### templateDir

          protected String templateDir

    - #### onclick

          protected String onclick

    - #### ondblclick

          protected String ondblclick

    - #### onmousedown

          protected String onmousedown

    - #### onmouseup

          protected String onmouseup

    - #### onmouseover

          protected String onmouseover

    - #### onmousemove

          protected String onmousemove

    - #### onmouseout

          protected String onmouseout

    - #### onfocus

          protected String onfocus

    - #### onblur

          protected String onblur

    - #### onkeypress

          protected String onkeypress

    - #### onkeydown

          protected String onkeydown

    - #### onkeyup

          protected String onkeyup

    - #### onselect

          protected String onselect

    - #### onchange

          protected String onchange

    - #### accesskey

          protected String accesskey

    - #### id

          protected String id

    - #### key

          protected String key

    - #### tooltip

          protected String tooltip

    - #### tooltipConfig

          protected String tooltipConfig

    - #### javascriptTooltip

          protected String javascriptTooltip

    - #### tooltipDelay

          protected String tooltipDelay

    - #### tooltipCssClass

          protected String tooltipCssClass

    - #### tooltipIconPath

          protected String tooltipIconPath

    - #### dynamicAttributes

          protected Map<String,String> dynamicAttributes

  - ### Constructor Detail

    - #### AbstractUITag

          public AbstractUITag()

  - ### Method Detail

    - #### populateParams

          protected void populateParams()

      Description copied from class: `ComponentTagSupport`
      Define method to populate component state based on the Tag parameters. Descendants should override this method for custom behaviour, but should always call the ancestor method when doing so.
      Overrides:
        `populateParams` in class `ComponentTagSupport`

    - #### setId

          public void setId(String id)

      Overrides:
        `setId` in class `javax.servlet.jsp.tagext.TagSupport`

    - #### setCssClass

          public void setCssClass(String cssClass)

    - #### setClass

          @Deprecated
          public void setClass(String cssClass)

      Deprecated. Use `setCssClass(String)` instead

    - #### setCssStyle

          public void setCssStyle(String cssStyle)

    - #### setStyle

          public void setStyle(String cssStyle)

    - #### setCssErrorClass

          public void setCssErrorClass(String cssErrorClass)

    - #### setCssErrorStyle

          public void setCssErrorStyle(String cssErrorStyle)

    - #### setTitle

          public void setTitle(String title)

    - #### setDisabled

          public void setDisabled(String disabled)

    - #### setLabel

          public void setLabel(String label)

    - #### setLabelPosition

          public void setLabelPosition(String labelPosition)

    - #### setRequiredPosition

          public void setRequiredPosition(String requiredPosition)

    - #### setErrorPosition

          public void setErrorPosition(String errorPosition)

    - #### setName

          public void setName(String name)

    - #### setRequiredLabel

          public void setRequiredLabel(String requiredLabel)

    - #### setTabindex

          public void setTabindex(String tabindex)

    - #### setValue

          public void setValue(String value)

    - #### setTemplateDir

          public void setTemplateDir(String templateDir)

    - #### setTemplate

          public void setTemplate(String template)

    - #### setTheme

          public void setTheme(String theme)

    - #### setOnclick

          public void setOnclick(String onclick)

    - #### setOndblclick

          public void setOndblclick(String ondblclick)

    - #### setOnmousedown

          public void setOnmousedown(String onmousedown)

    - #### setOnmouseup

          public void setOnmouseup(String onmouseup)

    - #### setOnmouseover

          public void setOnmouseover(String onmouseover)

    - #### setOnmousemove

          public void setOnmousemove(String onmousemove)

    - #### setOnmouseout

          public void setOnmouseout(String onmouseout)

    - #### setOnfocus

          public void setOnfocus(String onfocus)

    - #### setOnblur

          public void setOnblur(String onblur)

    - #### setOnkeypress

          public void setOnkeypress(String onkeypress)

    - #### setOnkeydown

          public void setOnkeydown(String onkeydown)

    - #### setOnkeyup

          public void setOnkeyup(String onkeyup)

    - #### setOnselect

          public void setOnselect(String onselect)

    - #### setOnchange

          public void setOnchange(String onchange)

    - #### setTooltip

          public void setTooltip(String tooltip)

    - #### setTooltipConfig

          public void setTooltipConfig(String tooltipConfig)

    - #### setAccesskey

          public void setAccesskey(String accesskey)

    - #### setKey

          public void setKey(String key)

    - #### setJavascriptTooltip

          public void setJavascriptTooltip(String javascriptTooltip)

    - #### setTooltipCssClass

          public void setTooltipCssClass(String tooltipCssClass)

    - #### setTooltipDelay

          public void setTooltipDelay(String tooltipDelay)

    - #### setTooltipIconPath

          public void setTooltipIconPath(String tooltipIconPath)

    - #### setLabelSeparator

          public void setLabelSeparator(String labelSeparator)

    - #### setDynamicAttribute

          public void setDynamicAttribute(String uri,
                                          String localName,
                                          Object value)
                                   throws javax.servlet.jsp.JspException

      Specified by:
        `setDynamicAttribute` in interface `javax.servlet.jsp.tagext.DynamicAttributes`
      Throws:
        `javax.servlet.jsp.JspException`

    - #### setPerformClearTagStateForTagPoolingServers

          public void setPerformClearTagStateForTagPoolingServers(boolean performClearTagStateForTagPoolingServers)

      Description copied from class: `StrutsBodyTagSupport`
      Request that the tag state be cleared during `StrutsBodyTagSupport.doEndTag()` processing, which may help with certain edge cases with tag logic running on servers that implement JSP Tag Pooling. Note: Even though the Tag classes extend this class `StrutsBodyTagSupport`, and this method `StrutsBodyTagSupport.setPerformClearTagStateForTagPoolingServers(boolean)` exists in the method hierarchy, the JSP processing requires us to explicitly override it in every Tag class in order for the Tag handler method to be visible to the JSP processing. Defining a setter in the superclass alone is insufficient (results in "Cannot find a setter method for the attribute").

      See `StrutsBodyTagSupport.clearTagStateForTagPoolingServers()` for additional details. Warning: Setting this value to true may allow for the desired behaviour, but doing so may violate the JSP specification. Set to true at your own risk.

      Overrides:
        `setPerformClearTagStateForTagPoolingServers` in class `StrutsBodyTagSupport`
      Parameters:
        `performClearTagStateForTagPoolingServers` - true if tag state should be cleared, false otherwise.

    - #### clearTagStateForTagPoolingServers

          protected void clearTagStateForTagPoolingServers()

      Description copied from class: `StrutsBodyTagSupport`
      Provide a mechanism to clear tag state, to handle servlet container JSP tag pooling behaviour with some servers, such as Glassfish.

      Usage: Override this method in descendant classes to clear any state that might cause issues should the servlet container re-use a cached instance of the tag object. If the descendant class does not declare any new field members then it should not be strictly necessary to call this method there. Typically that means calling the ancestor's `ComponentTagSupport.clearTagStateForTagPoolingServers()` method first, then resetting instance variables at the current level to their default state.

      Note: If the descendant overrides `StrutsBodyTagSupport.doEndTag()`, and does not call super.doEndTag(), then the descendant should call this method in the descendant doEndTag() method to ensure consistent clearing of tag state.

      Overrides:
        `clearTagStateForTagPoolingServers` in class `ComponentTagSupport`

Copyright © 2000–2023 Apache Software Foundation. All rights reserved.