Results 1 to 2 of 2

Thread: Using FlexMDI with Spring Actionscript

  1. #1

    Default Using FlexMDI with Spring Actionscript

    Hi. I'm using FlexMDI and I'd like to know what is the best approach to instantiate a component that has an injected model (presentation model pattern) and it's not instantiated through mxml. Something like this:

    PHP Code:
    var mdiWindow:MDIWindow = new MDIWindow();
    mdiWindow.addChild(new MyComponent());
    mdiCanvas.windowManager.add(mdiWindow); 
    If MyComponent has a model, it won't be instantiated by Spring (even if MyComponent is written using mxml). So, what can I do?

    I know I could inject the component itself too (let Spring manage it), but I'd like to know if there is a different approach, because I wouldn't like to configure all my components in the applicationContext file, just their model.

    Thanks in advance.

  2. #2
    Join Date
    Dec 2008
    Location
    Brussels
    Posts
    406

    Default

    I'm not too familiar with FlexMDI, but I guess stage wiring would be your best bet in this case.

    See these documentation sections:

    Spring Actionscript docs: Stage wiring

    hope that helps, if not, feel free to ask

    cheers,

    Roland

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •