We just released a new build (0.8.6b) with the following features:
DelegateInvoker: This was a contribution by Darron Schall (thank you Darron :)). He explains in detail how that works in his post
PropertySetter: This is a similar tag to the MethodInvoker but instead of calling a method in the generated object, it sets a property. The benefits are that your source can be anything, such as an ISmartObject, Class from the Cache, or just a regular value.
Example:
<PropertySetter generator="{ClassA}" targetKey="propertyOnClassA" source="{ClassB}" sourceKey="propertyOnClassB" sourceCache="inherit" />
AsyncCommandInvoker: This is a similar class to AsyncMethodInvoker but will always use the execute method instead of the one supplier in the Method argument.
ServiceInvokerBuilder: A base class that was added to suport DelegateInvoker. You dont need to worry about this one unless that you are extending the framework.
Property: Have you ever wanted to set a property in an object, but didnt want to use the Properties tag because you needed more control? Well here you have a Property tag. Just like the Properties tag, Property is an inner tag for all builder tags like MethodInvoker, ObjectBuilder, etc.
An example of a MethodInvoker with 2 inner tags, one that reads from the cache and the other that reads from the event:
<MethodInvoker generator="{ClassA}" method="someMethod" >
<Property sourceCache="inherit" source="{MyClassB}" sourceKey="propertyOnClassB" targetKey="propertyOnClassA"/>
<Property sourceCache="inherit" source="{event}" sourceKey="target" targetKey="myProp"/>
</MethodInvoker>
Now that the mock services have been released, the documentation in the pdf will be transferred to the website. The complete api docs for all mock services are coming soon.
Posted on February, 12, 2009 by Nahuel Foronda
Filed under: News
EventMap
***********
<EventHandlers type="{OEProgressEvent.GET_WEEKLY_PROGRESS}"
start="trace('Progress')" debug="true">
<RemoteObjectInvoker debug="true"
instance="{oeServices.progressService}"
method="getAllWeeklyProgress">
<resultHandlers>
<PropertySetter
targetKey="weeklyProgress"
source="{resultObject}"
generator="{ProgressManager}"
constructorArguments="{resultObject}">
</PropertySetter>
<!--<MethodInvoker
generator="{ProgressManager}"
method="setWeeklyProgress"
arguments="{resultObject}">
</MethodInvoker>-->
</resultHandlers>
</RemoteObjectInvoker>
</EventHandlers>
ProgressManager Class
***************************
The result of using PropertySetter tag
gets here
***********
private var val:*;
public function ProgressManager(value:*):void{
val=value;
}
instead of
**********
public function set weeklyProgress(value:ArrayCollection):void{
this._weeklyProgress = value;
dispatchEvent(new Event("weeklyProgressDataChange"));
Alert.show("weekly progress set");
}
Laura, any idea?
Thank you.