Hi Pavan,

No, using the @Action annotation only in Application and/or subclasses is not a prerequisite to use the application framework. To access the actions defined in this external class (lets assume a class called 'MyActions' with a method called 'doSomething'),
you will have to call:

IAction action = getContext().getActionMap(new MyActions()).get("doSomething");
(Call performed inside an 'Application' object)

So you need a 'ApplicationContext' (returned by 'getContext()') to be able to load these actions. You get an 'IAction' object back
which could be assigned to an 'ULCButton' for instance.

Note that calling 'getAction("doSomething")' (from inside an 'Application' object) will not work. You explicitely have to use the way
I described above. Hope this helps. Cheers and have a nice day,

christian
--
Canoo - Your Solution Provider for Rich Internet Applications

    Christian Ribeaud
    Canoo Engineering AG
    Kirschgartenstrasse 5
    CH-4051 Basel

    Tel: +41 61 228 94 44
    Fax: +41 61 228 94 49

    [email protected]
    http://www.canoo.com/

On Aug 10, 2009, at 7:07 PM, Sambare Pavan (KCAB 116) wrote:

Hi,

I am using the ApplicationFramework for development of ULC pages. There is a feature of annotating methods with @Action and then this method can be used as an ActionListener for your components.

However, is it a requirement that these @Action methods have to be in the Application or SingleFrameApplication class only? As otherwise, they do not get loaded.

Thanks & Regards,
Pavan Sambare
_______________________________________________
ULC-developer mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/ulc-developer

Reply via email to