org.apache.tapestry5.internal.transform
Interface ParameterConduit

All Superinterfaces:
FieldValueConduit

public interface ParameterConduit
extends FieldValueConduit

A facade around Binding and InternalComponentResources that is used to instrument fields with the Parameter annotation. Extends FieldValueConduit so that the get() method implicitly coerces the value to the field's type.

FieldValueConduit.get() will read from the underlying Binding and used the TypeCoercer coerce the value to the parameter field's type. get() also includes a null value check (as per Parameter.allowNull().

FieldValueConduit.set(Object) pushes the value into the binding.

Since:
5.2.0

Method Summary
 boolean isBound()
          Determines if the parameter is actually bound.
 void load()
          Invoked from the component's PageLifecycleListener.containingPageDidLoad() lifecycle method, to finishing initializing the conduit prior to real use.
 void reset()
          Resets the conduit, clearing any temporarily cached data (from a non-invariant Binding).
 void setDefault(Object defaultValue)
          Sets the default value for the parameter based on either the current value of the field, or on result from a default method.
 
Methods inherited from interface org.apache.tapestry5.ioc.services.FieldValueConduit
get, set
 

Method Detail

setDefault

void setDefault(Object defaultValue)
Sets the default value for the parameter based on either the current value of the field, or on result from a default method. This is only used if the parameter is not otherwise bound.

Parameters:
defaultValue - an object (which will be wrapped as a LiteralBinding, or a Binding instance

isBound

boolean isBound()
Determines if the parameter is actually bound.

Returns:

reset

void reset()
Resets the conduit, clearing any temporarily cached data (from a non-invariant Binding).


load

void load()
Invoked from the component's PageLifecycleListener.containingPageDidLoad() lifecycle method, to finishing initializing the conduit prior to real use.



Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.