A commonly requested feature in SCDD custom components (formerly Xcelsius 2008) is the ability to share data between custom components, across separate SWF files. Usually, developers turn to Flash Vars or other methods of workaround, which present limitations and additional work. Fortunately, there is another more streamlined approach if you wish to share data between 2 SCDD swf’s. This method comes with a couple of caveats, the first being that the swf’s need to be loaded via the SCDD SWF Loader component, and second, that the 2 SWF’s share the same Application Domain (the “This” option on the SCDD SWF Loader). If you can live with these 2 requirements, this can be a powerful approach for passing large volumes of data from component-to-component while completely bypassing the Excel model, if desired.
How it’s done
To accomplish component-to-component communication across swf’s is fairly straight forward. All you need is a ModelLocator-type singleton that both component’s share data through. The components don’t even need to be the same, they just need to refer to the same ModelLocator class and corresponding ModelLocator variables in order to share data. You can see how this is done by downloading the sample source code.
Next week, we’ll explore the possibilities of sharing data globally between swf’s using this approach. Globally, meaning that any SCDD component can access the data exposed by our custom component that leverages the ModelLocator.
Evan DeLodder is CTO at Centigon Solutions, an SAP Partner focused on the development of cutting edge mapping technologies in the Business Intelligence space. To learn more about him, please visit our Gurus page.