org.apache.tapestry5.corelib.base

## Class BaseClientElement

- java.lang.Object
- - org.apache.tapestry5.corelib.base.BaseClientElement

- All Implemented Interfaces:
    ClientElement
  Direct Known Subclasses:
    Alerts

      public abstract class BaseClientElement
      extends Object
      implements ClientElement

  Provides support for elements that will optionally render a unique `id` attribute, but only if it is requested. Subclasses should invoke `storeElement(org.apache.tapestry5.dom.Element)` when they begin an element that requires an id.
  Since:
    5.4

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected JavaScriptSupport` | `javaScriptSupport`
    `protected ComponentResources` | `resources`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BaseClientElement()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getClientId()` When invoked the first time (per request), a unique id is assigned and and id attribute added to the element for the component.
    `protected void` | `storeElement(Element element)` Invoked (usually from a `BeginRender` phase method) to assigned the element, and clear the clientId (only relevant for components that render in a loop).

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

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

- - ### Field Detail

    - #### resources

          @Inject
          protected ComponentResources resources

    - #### javaScriptSupport

          @Environmental
          protected JavaScriptSupport javaScriptSupport

  - ### Constructor Detail

    - #### BaseClientElement

          public BaseClientElement()

  - ### Method Detail

    - #### storeElement

          protected void storeElement(Element element)

      Invoked (usually from a `BeginRender` phase method) to assigned the element, and clear the clientId (only relevant for components that render in a loop).

    - #### getClientId

          public String getClientId()

      When invoked the first time (per request), a unique id is assigned and and id attribute added to the element for the component.
      Specified by:
        `getClientId` in interface `ClientElement`

${project.version} - Copyright © 2003-2015 The Apache Software Foundation.