org.apache.tapestry.binding
Class FieldBinding

java.lang.Object
  extended by org.apache.tapestry.binding.AbstractBinding
      extended by org.apache.tapestry.binding.FieldBinding
All Implemented Interfaces:
IBinding, ILocatable

Deprecated. To be removed in 2.5 with no replacement. Can be accomplished using OGNL expressions.

public class FieldBinding
extends AbstractBinding

A type of static IBinding that gets it value from a public field (static class variable) of some class or interface.

The binding uses a field name, which consists of a fully qualified class name and a static field of that class seperated by a dot. For example: com.foobar.SomeClass.SOME_FIELD.

If the class specified is for the java.lang package, then the package may be ommitted. This allows Boolean.TRUE to be recognized as a valid value.

The IPageSource maintains a cache of FieldBindings. This means that each field will be represented by a single binding ... that means that for any field, the accessValue() method (which obtains the value for the field using reflection) will only be invoked once.

Version:
$Id: FieldBinding.java 243791 2004-02-19 17:38:13Z hlship $
Author:
Howard Lewis Ship

Constructor Summary
FieldBinding(IResourceResolver resolver, String fieldName, ILocation location)
          Deprecated.  
 
Method Summary
 Object getObject()
          Deprecated. Returns the value of this binding.
 String toString()
          Deprecated.  
 
Methods inherited from class org.apache.tapestry.binding.AbstractBinding
createReadOnlyBindingException, getBoolean, getDouble, getInt, getLocation, getObject, getString, isInvariant, isWrapper, setBoolean, setDouble, setInt, setObject, setString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FieldBinding

public FieldBinding(IResourceResolver resolver,
                    String fieldName,
                    ILocation location)
Deprecated. 
Method Detail

toString

public String toString()
Deprecated. 
Overrides:
toString in class Object

getObject

public Object getObject()
Deprecated. 
Description copied from interface: IBinding
Returns the value of this binding. This is the essential method. Other methods get this value and cast or coerce the value.