Announcement Announcement Module
No announcement yet.
Autowiring - new user Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Autowiring - new user


    I'm new to SAS. I would like to configure a AMFChannel in my .xml config file and reuse it in several components by having the the components Autowire the AMFChannel in.

    I have successfully set up an XML configured application context with an AMFChannel and I can get a hold of the channel by myContext.getObject("myAMFChannel") as AMFChannel.

    However, I can not seem to manage to Autowire the Channel in to any of my components using [Autowire]. Now the documentation all deals with staged components but there is the following note:

    "These examples all deal with stage components, yet it is also possible to add the described metadata to 'normal' objects, the functionality remains the same."

    I did add the compiler directive -keep-as3-metadata += Autowired as per the documentation for Autowiring and I did add the autowiringStageProcessor to my config file.

    I suspect I am doing something foolish, but help would be appreciated.


  • #2
    One new user to another


    I used SAS a little bit a year ago and I am trying to use it again for new project. For me [Autowired...] metadata tag only appears to only work for stage components for me. For non-stage components, I can specify the autowiring in the application-context.xml and it works this way:

    <object id="testService" class="com.blah.service.TestService" autowire="byName" />

    I am also having trouble with the [RouteEvents] metadata tag but [EventHandler] appears to work.



    • #3

      I guess I am not the sharpest tool in the shed.

      I ended up doing my autowiring in my View classes and taking care to make sure the context was loaded before the views were added and all is fine.