Recently I have been working with Adobe Flex and Adobe LiveCycle Data Services for building a dossier-management system.
I came around some strange behavior which I couldn’t understand regarding displaying referential/static data in a flex user interface.
The requirement I need to implement in my flex application is to display static, referential data in the different forms being filled in by the user.
This data needs to be looked-up and displayed in for example dropdown-lists and can be adjusted by administrator, so no CRUD-operations are needed in the entry-module of the application.
What I wanted to do is fill some ArrayCollections with data stored in an Oracle 10G database. I don’t want to convert my data to actionscript or java objects, no transfer objects or value objects because I just want to display them so I won’t use any adapters. I made a new destination in my data-management-config and added a fill:
<sql>SELECT cd as “cd”,
omschrijving as “omschrijving”
You might notice that I used an alias in my query, initially I didn’t know this but without the alias I can’t display any data. For me this seemed the right solution to retrieve my data but when I tried it I didn’t retrieve anything. I couldn’t see the data in the console of my tomcat server either; my ArrayCollection always had length 0.
Not sure for what reason but I put in a JavaAdapter :
<adapter ref=”java-dao” />
Out of the blue the ArrayCollection was populated with the wright data. Note that I did not specify any java class in my destination. I also tried to use the actionscript adapter but then I couldn’t receive any data.
I’m not sure this is the behavior I must expect but for now it works and I don’t need to define any transfer-objects in the form of actionscript or java objects, which is what I wanted to accomplish.