net.sf.beanform.binding
Class DualBinding
java.lang.Object
net.sf.beanform.binding.DualBinding
- All Implemented Interfaces:
- Locatable, org.apache.tapestry.IBinding
public class DualBinding
- extends Object
- implements org.apache.tapestry.IBinding
A special binding type that allows us to simulate adding and removing
bindings to components. This binding behaves like a custom binding unless
there is no custom binding, in which case it behaves like the standard
(default) binding for a given binding name.
- Author:
- Daniel Gredler
Constructor Summary |
DualBinding(org.apache.tapestry.IBinding custom,
org.apache.tapestry.IBinding standard)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DualBinding
public DualBinding(org.apache.tapestry.IBinding custom,
org.apache.tapestry.IBinding standard)
setCustom
public void setCustom(org.apache.tapestry.IBinding custom)
getObject
public Object getObject()
- Specified by:
getObject
in interface org.apache.tapestry.IBinding
getObject
public Object getObject(Class type)
- Specified by:
getObject
in interface org.apache.tapestry.IBinding
isInvariant
public boolean isInvariant()
- Specified by:
isInvariant
in interface org.apache.tapestry.IBinding
setObject
public void setObject(Object value)
- Specified by:
setObject
in interface org.apache.tapestry.IBinding
getDescription
public String getDescription()
- Specified by:
getDescription
in interface org.apache.tapestry.IBinding
getLocation
public Location getLocation()
- Specified by:
getLocation
in interface Locatable
addCustomBindings
public static void addCustomBindings(org.apache.tapestry.IComponent component,
Map<String,org.apache.tapestry.IBinding> bindings,
boolean clearFirst)
- Adds temporary custom bindings to a component by overriding the existing bindings
with
DualBinding
instances whose behavior can later be reverted.
removeCustomBindings
public static void removeCustomBindings(org.apache.tapestry.IComponent component)
- Reverts the behavior of the specified component's temporarily customized bindings to
whatever it was prior to customization.
Copyright © 2005-2008 SourceForge.net. All Rights Reserved.