Global Ids

GID gives any component a unique id that can be referred to from render and execute statements without having to deal with the component hierarchy.

This tag handler aims to solve the problem where a deeply nested component needs to refer to another component which is deeply nested within another parent naming container. There are multiple workarounds for this issue, but most are not elegant or even easy to reason about, hence the gid tag handler.

Nest a <t:gid value="myUniqueId"/> tag inside any component, and then refer to this component in a render or execute statement as #myUniqueId. The actual id of the component will be resolved when needed. Important: Make sure the parent component of this tag actually emits an id, or set one explicitly.

The time is Fri Sep 25 00:12:00 CEST 2020.

Example
Documentation

<h:panelGroup id="theActualId">
    <t:gid value="myUniqueId"/>
    The time is #{controller.now}.
</h:panelGroup>

<h:form>
    <t:commandButton value="Update the time" render="#myUniqueId" />
</h:form>

GID gives any component a unique id that can be referred to from render and execute statements without having to deal with the component hierarchy.

Info
Tag name gid
Component type
Renderer type
Attributes
NameDescriptionRequired
valueThe value of the globally unique component. Can be refered to as #value from render and execute statements of all TornadoFaces components, like CommandButton and CommandLink. true