For every generator attribute, you can use a shorter way of specifying the class name. Say you have a class called com.mydomain.MyWorker that you want to instantiate in an EventHandlers block. Instead of specifying the class name as a string: generator="com.mydomain.MyWorker", you can use a binding:

<MethodInvoker generator="{MyWorker}" ..... />

Note that you also need to have an import com.mydomain.* statement at the top of your EventMap.

This allows you to jump to the class if you are using Flex Builder. You can press the command key (Mac) or the Ctrl key (Windows) and click on the generator class (MyWorker in the example) and it will take you to the class definition.

It is important to note that this binding will be executed only once because we are binding to class, which doesn't change during the life of the application.

1 response

  1. For those using WebORB, we have now integrated support for the Mate framework in our code generators (available in WebORB for .NET 4.0 now and soon WebORB for Java). You can learn more about what is new in Version 4.0 here:

Comments now closed