Package org.apache.tiles.web.jsp.taglib

# Class UseAttributeTag

java.lang.Object
jakarta.servlet.jsp.tagext.SimpleTagSupport
org.apache.tiles.web.jsp.taglib.UseAttributeTag

All Implemented Interfaces:
  `jakarta.servlet.jsp.tagext.JspTag`, `jakarta.servlet.jsp.tagext.SimpleTag`

public class UseAttributeTag extends jakarta.servlet.jsp.tagext.SimpleTagSupport
Exposes am attribute as a scripting variable within the page.

Since:
  Tiles 1.0

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `UseAttributeTag.Tei`
  Implementation of TagExtraInfo which identifies the scripting object(s) to be made visible.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `UseAttributeTag()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `doTag()`
  `String`
  `getClassname()`
  Get class name.
  `String`
  `getId()`
  Returns the id of the imported scripting variable.
  `String`
  `getName()`
  Get the name.
  `String`
  `getScope()`
  Get scope.
  `String`
  `getScriptingVariable()`
  Returns the scripting variable to use.
  `boolean`
  `isIgnore()`
  Get ignore flag.
  `void`
  `setClassname(String name)`
  Set the class name.
  `void`
  `setId(String id)`
  Sets the id of the imported scripting variable.
  `void`
  `setIgnore(boolean ignore)`
  Set ignore flag.
  `void`
  `setName(String name)`
  Set the name.
  `void`
  `setScope(String scope)`
  Set the scope.

  ### Methods inherited from class jakarta.servlet.jsp.tagext.SimpleTagSupport

  `findAncestorWithClass, getJspBody, getJspContext, getParent, setJspBody, setJspContext, setParent`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### UseAttributeTag

    public UseAttributeTag()

- ## Method Details

  - ### getId

    public String getId()
    Returns the id of the imported scripting variable.
    Returns:
      The id of the imported scripting variable.
    Since:
      2.2.0

  - ### setId

    public void setId(String id)
    Sets the id of the imported scripting variable.
    Parameters:
      `id` - The id of the imported scripting variable.
    Since:
      2.2.0

  - ### setScope

    public void setScope(String scope)
    Set the scope.
    Parameters:
      `scope` - Scope.

  - ### getScope

    public String getScope()
    Get scope.
    Returns:
      Scope.

  - ### getName

    public String getName()
    Get the name.
    Returns:
      Name.

  - ### setName

    public void setName(String name)
    Set the name.
    Parameters:
      `name` - The new name

  - ### setIgnore

    public void setIgnore(boolean ignore)
    Set ignore flag.
    Parameters:
      `ignore` - default: false: Exception is thrown when attribute is not found, set to true to ignore missing attributes silently

  - ### isIgnore

    public boolean isIgnore()
    Get ignore flag.
    Returns:
      default: false: Exception is thrown when attribute is not found, set to true to ignore missing attributes silently

  - ### getClassname

    public String getClassname()
    Get class name.
    Returns:
      class name

  - ### setClassname

    public void setClassname(String name)
    Set the class name.
    Parameters:
      `name` - The new class name.

  - ### doTag

    public void doTag() throws jakarta.servlet.jsp.JspException, IOException
    Specified by:
      `doTag` in interface `jakarta.servlet.jsp.tagext.SimpleTag`
    Overrides:
      `doTag` in class `jakarta.servlet.jsp.tagext.SimpleTagSupport`
    Throws:
      `jakarta.servlet.jsp.JspException`
      `IOException`

  - ### getScriptingVariable

    public String getScriptingVariable()
    Returns the scripting variable to use.
    Returns:
      The scripting variable.