PDA

View Full Version : Passing patameters to an Action



dlouwers
3 Sep 2010, 8:05 AM
Hi,

I was just in the process of extracting certain reusable actions into Ext.Action instances. There were some minor challenges, for instance, lazy instantiation. Generally I use xtypes extensively so that I have some flexibility where I decare certain components. I couldn't find a way to do the same using actions. I have found a way to go around this by creating a component factory and registering it as an xtype. I combined this with an ActionManager that allows me to register and retrieve actions.

However, I do not know how I can pass parameters to an Action. Modifying scope doesn't work and I cannot influence what is passed to the handle function. Is there an example how this can be achieved?

Thanks,

Dirk Louwers

3 Sep 2010, 10:58 AM
you can probably use action.handler.createInterceptor().

Condor
6 Sep 2010, 3:17 AM
Have you seen my ActionManager (http://www.sencha.com/forum/showthread.php?66682-3.0-Easy-actions)?