|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tapestry.binding.AbstractBinding org.apache.tapestry.binding.ListenerBinding
public class ListenerBinding
A very specialized binding that can be used as an IActionListener
,
executing a script in a scripting language, via
Bean Scripting Framework.
Constructor Summary | |
---|---|
ListenerBinding(IComponent component,
String language,
String script,
ILocation location)
|
Method Summary | |
---|---|
void |
actionTriggered(IComponent component,
IRequestCycle cycle)
A ListenerBinding is also a IActionListener . |
boolean |
getBoolean()
Always returns true. |
double |
getDouble()
Gets the value of the Binding using IBinding.getObject() and coerces it
to a double . |
int |
getInt()
Gets the value of the Binding using IBinding.getObject() and coerces it
to an int . |
Object |
getObject()
Returns this. |
String |
getString()
Returns the underlying script. |
Methods inherited from class org.apache.tapestry.binding.AbstractBinding |
---|
createReadOnlyBindingException, getLocation, getObject, isInvariant, isWrapper, setBoolean, setDouble, setInt, setObject, setString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ListenerBinding(IComponent component, String language, String script, ILocation location)
Method Detail |
---|
public boolean getBoolean()
getBoolean
in interface IBinding
getBoolean
in class AbstractBinding
Tapestry.evaluateBoolean(Object)
public int getInt()
IBinding
IBinding.getObject()
and coerces it
to an int
. Strings will be parsed, and other
java.lang.Number
classes will have intValue()
invoked.
getInt
in interface IBinding
getInt
in class AbstractBinding
public double getDouble()
IBinding
IBinding.getObject()
and coerces it
to a double
. Strings will be parsed, and other
java.lang.Number
classes will have doubleValue()
invoked.
getDouble
in interface IBinding
getDouble
in class AbstractBinding
public String getString()
getString
in interface IBinding
getString
in class AbstractBinding
public Object getObject()
getObject
in interface IBinding
public void actionTriggered(IComponent component, IRequestCycle cycle)
IActionListener
. It
registers a number of beans with the BSF manager and invokes the
script.
Registers the following bean:
IComponent
, typically the same as the page
IPage
trigged by the request (obtained by IRequestCycle.getPage()
IRequestCycle
, from which can be found
the IEngine
, etc.
actionTriggered
in interface IActionListener
component
- The component which was "triggered".cycle
- The request cycle in which the component was triggered.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |