|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.formaria.aria.evaluator.DefaultAttributeEvaluator
org.formaria.builder.generic.GenericBuilderAttributeEvaluator
public class GenericBuilderAttributeEvaluator
An attribute evaluator. This attribute evaluator extends the default evaluator by adding support for the ${values},${value} arguments. The evaluator also support mapping of attributes through the attribute names specified as ${attribName}.
The attributes can also be defined in classes other than the current page or classes derived from Page. The syntax for such expressions is as follows:
${mypackage.MyClass[referenceName].myMethod(args...)} for a named object instance${mypackage.MyClass[].myMethod(args...)} to create a new instance of the class on each evaluation${mypackage.MyClass.myMethod(args...)} to invoke a static method${myMethod[referenceName](args...)} for a method contained with the invoking page${this[componentName].componentMethod(args...)} for a method contained within named component${this.method(args...)} for a method contained within the enclosing page, identical to 4 above${project.method(args...)} for a method contained within the project${comp.method(args...)} for a method contained within the component${this} for a reference to the page${comp} for a reference to the component${value} for a reference to the named argument value${values} for a reference to the named argument valueswhere mypackage is the name of the Java package containing the class MyClass. The value of referenceName is a user defined value that identifies the instance of the class. The application instantiates an instance of the class when the expression is first encountered and thereafter maintains the instance with each subsequent call retrieving the same instance of the class.
Copyright (c) Formaria Ltd., 2001-2008, This software is licensed under the GNU Public License (GPL), please see license.txt for more details. If you make commercial use of this software you must purchase a commercial license from Formaria.
| Field Summary |
|---|
| Fields inherited from class org.formaria.aria.evaluator.DefaultAttributeEvaluator |
|---|
classInstances, currentProject, exceptionHandler, provider, result |
| Constructor Summary | |
|---|---|
GenericBuilderAttributeEvaluator(Project project)
Create a new evaluator |
|
| Method Summary | |
|---|---|
java.lang.Object |
evaluateAttribute(java.awt.Component comp,
java.lang.String methodSpec,
java.lang.String attribValue,
XmlElement childNode)
Invoke the specified method |
PageSupport |
getPage()
Get the page that this evaluator is operating upon |
protected java.lang.Object |
lookupReference(java.lang.String reference)
Lookup a reference |
void |
setPage(PageSupport p)
Set the page upon which this component operates |
| Methods inherited from class org.formaria.aria.evaluator.DefaultAttributeEvaluator |
|---|
evaluateAttribute, getMethodReference, getMethodReference, getObject, getResult, setCurrentProject, setExceptionHandler, setResult |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GenericBuilderAttributeEvaluator(Project project)
currentProject - the current projectproject - the current or owning project| Method Detail |
|---|
public java.lang.Object evaluateAttribute(java.awt.Component comp,
java.lang.String methodSpec,
java.lang.String attribValue,
XmlElement childNode)
attribValue - the value of the attribute.childNode - the source xml nodepublic PageSupport getPage()
public void setPage(PageSupport p)
p - the pageprotected java.lang.Object lookupReference(java.lang.String reference)
lookupReference in class DefaultAttributeEvaluatorreference - a stripped reference e.g. values - which would have been
specified as ${values}
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||