net.sf.tacos.services.impl
Class TemplateBinding

java.lang.Object
  extended by org.apache.tapestry.binding.AbstractBinding
      extended by net.sf.tacos.services.impl.TemplateBinding
All Implemented Interfaces:
Locatable, org.apache.tapestry.IBinding

public class TemplateBinding
extends org.apache.tapestry.binding.AbstractBinding

An implementation of Tapestry IBinding, provide a LiteralBinding similar binding which could have variables inside. the variable inside should be put into ${} .
example: <binding name="effects" value="template:some id is ${currNote.id}."/>

You may also get the expression from page's locale file.
example: <binding name="effects" value="template:%message-code"/>

Author:
Felix Sun

Constructor Summary
TemplateBinding(String description, Location location, org.apache.tapestry.coerce.ValueConverter valueConverter, org.apache.tapestry.IComponent root, String expression, org.apache.tapestry.binding.BindingFactory nestedBindingFactory)
          constructor
 
Method Summary
 Object getObject()
          Evaluate the value with inside variables.
 boolean isInvariant()
          Should be variant because of inside ognl expression.
 
Methods inherited from class org.apache.tapestry.binding.AbstractBinding
createReadOnlyBindingException, extendDescription, getComponent, getDescription, getLocation, getObject, getValueConverter, setObject, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TemplateBinding

public TemplateBinding(String description,
                       Location location,
                       org.apache.tapestry.coerce.ValueConverter valueConverter,
                       org.apache.tapestry.IComponent root,
                       String expression,
                       org.apache.tapestry.binding.BindingFactory nestedBindingFactory)
constructor

Parameters:
description -
location -
valueConverter -
root - The root object against which the nested property name is evaluated.
expression - plain string or message code in page's specification file.
nestedBindingFactory - Internal used BindingFactory
Method Detail

getObject

public Object getObject()
Evaluate the value with inside variables.

Returns:
binding value

isInvariant

public boolean isInvariant()
Should be variant because of inside ognl expression.

Specified by:
isInvariant in interface org.apache.tapestry.IBinding
Overrides:
isInvariant in class org.apache.tapestry.binding.AbstractBinding
Returns:
indicate it is variant.
See Also:
IBinding.isInvariant()