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

# Class DefinitionTag

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

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

public class DefinitionTag extends jakarta.servlet.jsp.tagext.SimpleTagSupport

Create a definition at runtime.

Create a new definition at runtime. Newly created definition will be available across the entire request.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DefinitionTag()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `doTag()`
  `String`
  `getExtends()`
  Getter for extends property.
  `String`
  `getName()`
  Getter for name property.
  `String`
  `getPreparer()`
  Getter for preparer property.
  `String`
  `getRole()`
  Getter for role property.
  `String`
  `getTemplate()`
  Getter for template property.
  `void`
  `setExtends(String extendsParam)`
  Setter for extends property.
  `void`
  `setName(String name)`
  Setter for name property.
  `void`
  `setPreparer(String preparer)`
  Setter for preparer property.
  `void`
  `setRole(String role)`
  Setter for role property.
  `void`
  `setTemplate(String template)`
  Setter for template property.

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

  - ### DefinitionTag

    public DefinitionTag()

- ## Method Details

  - ### getName

    public String getName()
    Getter for name property.
    Returns:
      The name of the definition to create. If not specified, an anonymous definition will be created.

  - ### setName

    public void setName(String name)
    Setter for name property.
    Parameters:
      `name` - The name of the definition to create. If not specified, an anonymous definition will be created.

  - ### getTemplate

    public String getTemplate()
    Getter for template property.
    Returns:
      The template of this definition.

  - ### setTemplate

    public void setTemplate(String template)
    Setter for template property.
    Parameters:
      `template` - The template of this definition.

  - ### getRole

    public String getRole()
    Getter for role property.
    Returns:
      A comma-separated list of roles. If present, the definition will be rendered only if the current user belongs to one of the roles.

  - ### setRole

    public void setRole(String role)
    Setter for role property.
    Parameters:
      `role` - A comma-separated list of roles. If present, the definition will be rendered only if the current user belongs to one of the roles.

  - ### getExtends

    public String getExtends()
    Getter for extends property.
    Returns:
      The definition name that this definition extends.

  - ### setExtends

    public void setExtends(String extendsParam)
    Setter for extends property.
    Parameters:
      `extendsParam` - The definition name that this definition extends.

  - ### getPreparer

    public String getPreparer()
    Getter for preparer property.
    Returns:
      The preparer to use to invoke before the definition is rendered.

  - ### setPreparer

    public void setPreparer(String preparer)
    Setter for preparer property.
    Parameters:
      `preparer` - The preparer to use to invoke before the definition is rendered.

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