Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/SlevinBE/Springas-subviewcontext
An extension for Spring Actionscript 1 which enables you to create a context for a subview of your application.
https://github.com/SlevinBE/Springas-subviewcontext
Last synced: 3 months ago
JSON representation
An extension for Spring Actionscript 1 which enables you to create a context for a subview of your application.
- Host: GitHub
- URL: https://github.com/SlevinBE/Springas-subviewcontext
- Owner: SlevinBE
- Created: 2011-10-14T05:42:38.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2011-10-21T06:48:14.000Z (about 13 years ago)
- Last Synced: 2024-06-24T02:38:15.727Z (5 months ago)
- Language: ActionScript
- Homepage:
- Size: 93.8 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.textile
Awesome Lists containing this project
- awesome-actionscript-sorted - Springas-subviewcontext - An extension for Spring Actionscript 1 which enables you to create a context for a subview of your application. (Unsorted / Other API)
README
h2. Introduction
An extension for Spring Actionscript 1 which enables you to create a context for a subview of your application, just like it's
already possible for modules.h2. Important!
This extension is made for spring-actionscript 1.x. It won't be necessary to use this extension for spring-actionscript 2.0
since this functionality will be build in.h2. How to use the extension
h3. Setup
1. The first thing you need to do is to define an applicationContext for your subview, this
applicationContext will contain the objects specific for your subview (like presentationmodels, mediators, models,...).2. Then you have to instantiate your context in your subview, like this:
_tabApplicationContext = new RootComponentXMLApplicationContext(this); // this == the subview
_tabApplicationContext.parent = parentApplicationContext;
_tabApplicationContext.addConfigLocation("applicationSubViewContext.xml");
_tabApplicationContext.load();3. from now on the dependencies of your subview and its subcomponents will be automatically injected when they get instantiated.
h3. Popups
Popups are somewhat special when it comes to injection. Because popups aren't added to the default displayList it's
impossible for the extension to know when the popup is added to the view. Therefore you have to manually register the popup
with the applicationContext. Follow these steps to do this:1. define the AutowireViewRegistrator class as a singleton in your subview applicationContext.
2. define a property of type IViewRegistrator in the class where the popup is created, like this:
[Autowired]
public var viewRegistrator:IViewRegistrator;3. then register the popup with the viewRegistrator:
viewRegistrator.registerView(popup);4. from now on your popup (and any new subcomponents) will get autowired.