flash data integration:
I'm working with components in MX Pro 2004, and I've hit a snag that absolutely refuses to untangle. I'm attempting to use an XMLConnector to read data into a dataset, and then display that in a list box. The only thing displaying in the list box is 'undefined.' These are the steps I've followed: 1. Drag XMLConnector onto stage and name xmlConnect. 2. Switch to schema tag, select the 'results : XML' object, and import the schema from the XML file. The schema looks like this: results : XML + beneFacts : Object __+ list_item : Array ____+ [n] : Object ______name : String ______+ coverage : <empty> ________@type : String ______keywords : String ______+ text : Object ________+ p : Array __________[n] : String 3. Drag a DataSet component onto the stage and name xmlDataSet. 4. Create a binding between xmlConnect.beneFacts.list_item and xmlDataSet.dataProvider. The direction is set to 'in' from the dataset. 5. Drag a List component onto the stage and name it ListBox. 6. Create a binding between xmlDataSet.dataProvider and ListBox.dataProvider. The direction is set to 'in' from the list. 7. Set the formatter on the binding between the dataset and list to 'Rearrange Fields.' Set the formatter options to: 'label=name;data=.'. The XML used looks something like this: <?xml version = '1.0'?> <benefacts> <list_item> <name>Other Random Disease</name> <coverage type = 'partial' /> <keywords>alternate unknown illness</keywords> <text> <p>This is a somewhat less generic unknown illness.</p> <p>One might almost go so far as to call is specific.</p> </text> </list_item> ... </benefacts> According to every tutorial I've found on the Web, this should work just fine. Any ideas? Rys
This what I'm getting from the data log: 2/28 11:0:3 xmlConnect: XMLConnector Triggered, benefacts.xml 2/28 11:0:3 xmlConnect: Invoking XMLConnector benefacts.xml() 2/28 11:0:3 Executing binding from xmlDataSet:dataProvider:- to ListBox:dataProvider:- 2/28 11:0:3 Assigning new value '-' (-) 2/28 11:0:3 xmlConnect: Data of property 'results' has changed. true. 2/28 11:0:3 Executing binding from xmlConnect:results:benefacts.list_item to xmlDataSet:dataProvider:- 2/28 11:0:3 Assigning new value '[<list_item><name>Random Disease</name><coverage t...' (Array) It looks to me like the XML connector is executing the binding to the dataset before it finishes loading. The dataset then executes the binding to the list, but it doesn't have any data. The connector finishes loading and executes the binding to the dataset again, but it doesn't execute the binding to the list again. Any thoughts on how I can force the binding to fire again? Rys
Don't see what you're looking for? Try a search.
|