org.apache.tapestry.binding
Class ClientIdBinding
java.lang.Object
org.apache.tapestry.binding.AbstractBinding
org.apache.tapestry.binding.ClientIdBinding
- All Implemented Interfaces:
- org.apache.hivemind.Locatable, IBinding
public class ClientIdBinding
- extends AbstractBinding
An implementation of Tapestry IBinding
that simplifies
access to a component's clientId.
You can use this binding in order to safely find out the
client-side id that was (or will be) generated for a given
component.
Here's an example of how to get the client id of a Tapestry component:
<span jwcid="@Any" dojoType="myDojoComponent" contentId="clientId:content" />
The previous code can also be written using the ognl binding:
<span jwcid="@Any" dojoType="myDojoComponent" contentId="ognl:components.content.clientId" />
but the clientId binding is more compact and performs much faster.
Method Summary |
Object |
getComponent()
Returns the component to which this binding is connected; this is currently only used when
building certain exceptions. |
Object |
getObject()
Returns the value of this binding. |
boolean |
isInvariant()
Default implementation: returns true. |
ClientIdBinding
public ClientIdBinding(String description,
ValueConverter valueConverter,
org.apache.hivemind.Location location,
IComponent component,
String componentId)
getObject
public Object getObject()
- Description copied from interface:
IBinding
- Returns the value of this binding. This is the essential method.
getComponent
public Object getComponent()
- Description copied from class:
AbstractBinding
- Returns the component to which this binding is connected; this is currently only used when
building certain exceptions. This implementation returns null.
- Overrides:
getComponent
in class AbstractBinding
- Returns:
- The
IComponent
object this binding is set against.
isInvariant
public boolean isInvariant()
- Description copied from class:
AbstractBinding
- Default implementation: returns true.
- Specified by:
isInvariant
in interface IBinding
- Overrides:
isInvariant
in class AbstractBinding
Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.