1 Reply Latest reply on Nov 12, 2012 6:20 AM by Claudiu Ursica

    Robotlegs Inject object in ItemRenderer

    quebequiano

      Hi all!

       

      I'm using RobotLegs DI framework. It work's generally fine, but not for the ItemRenderer classes.

       

      I have this:

       


      public class GridEventosItemRenderer extends ItemRenderer {

      -------



      [Inject]


      public var enumResources:EnumResources;

      ----

      }

       

      And I map the singleton in the main application Context.

       


      public class MasterContext extends Context {

       

       



      public function MasterContext() {



      super();


      }

       

       



      override public function startup():void {



      super.startup();





      //Common



      injector.mapSingleton(EnumResources); 



      injector.injectInto(contextView);

       



      }

      }

       

      And I also add the context to the list using the itemrenderer:

       

      List:

       

      ----

       


      <fx:Declarations>


      <control:MasterContext contextView="{this}"/>

      </fx:Declarations>

      ---

       

       

       

      Is there any special threatment for this kind of classes??

       

      Thanx