Hi all,
I'm making my first steps in Flash Islands and as an real-life example, I tried to display a ABAP table in a DataGrid. I know about the principle "don't solve problems with Islands which could be solved with WD", bit it was just for learning. After this example would work, I'm striving for refactoring it to a more complex graphical solution as in the tutorials.
<p>I encountered a problem while trying to use an ArrayCollection and display it in a DataGrid. A typically Flex code snippet would be like this:
<mx:Script> <![CDATA[ import mx.collections.ArrayCollection; [Bindable] public var myData : ArrayCollection // fill the myData collection here ]]>
This coding didn't work - I thought about a WDA configuration mapping problem.
After a time-consuming examination I found, that the following coding works:
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" width="100%" height="100%" preinitialize="preInit()" initialize="initApp()" > <mx:Script> <![CDATA[ import mx.collections.ArrayCollection; import sap.FlashIsland; [Bindable] public var col1 : String [Bindable] public var col2 : String [Bindable] public var col3 : String [Bindable] public var myData : ArrayCollection private function preInit() : void { myData = new ArrayCollection() } private function initApp() : void { FlashIsland.register(this) } ]]>