@SupportsInformalParameters public class Any extends Object implements ClientElement
JavaScriptSupport.allocateClientId(String)
(so it will be unique on the client side) and is available after the component
renders using getClientId()
. The Any component has no template of its
own but does render its body, if any.
Some common uses are:
RenderNotification
mixin, triggers event
notifications when it enters the BeginRender and EndRender phases:
<img t:type="any" t:mixins="renderNotification">And the following renders a td element with the
NotEmpty
mixin to ensure
that a non-breaking space ( ) is rendered if the td element would
otherwise be empty:
<td t:type="any" t:mixins="NotEmpty">
InjectComponent
to get the component, then call getClientId()
to retrieve the ID.)
<table t:type="any" id="clientId">As an alternative to calling getClientId, you can use the
RenderClientId
mixin to force the id attribute to appear in the HTML:
<table t:type="any" t:mixins="RenderClientId">
<t:any element="prop:element" ... >
public class MyComponent extends Any { ... }
Name | Type | Flags | Default | Default Prefix |
---|---|---|---|---|
clientId | String | prop: | literal | |
The desired client id, which defaults to the component's id. | ||||
element | String | literal | ||
The name of the element to be rendered, typically one of the standard (X)HTML elements, "div", "span", "a", etc., although practically any string will be accepted. The default comes from the template, or is "div" if the template does not specify an element. |
Constructor and Description |
---|
Any() |
public Any()
public String getClientId()
getClientId
in interface ClientElement
Copyright © 2003-2013 The Apache Software Foundation.