Quantcast
Channel: Adobe Community : Popular Discussions - LiveCycle Data Services
Viewing all articles
Browse latest Browse all 58696

grid is not populating on creationComplete

$
0
0
hi, im a flex newbie, and cannot get the grid populated at creationcomplete.
if ic click on the the button with the function myService.sayHelloQuery(), the grid shows the data from the coldfusion cfc
whats wrong with my code?

thanks
herbert

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="myService.sayHelloQuery();">
<mx:Script>
<![CDATA[
import mx.rpc.events.ResultEvent;
import mx.controls.Alert;
import mx.collections.ArrayCollection;


[Bindable]
public var qResult:ArrayCollection;


}
public function handleQueryResult(event:ResultEvent):void{
qResult=event.result as ArrayCollection;
}
]]>
</mx:Script>

<mx:RemoteObject
id="myService"
destination="ColdFusion"
source="HelloWorld"
showBusyCursor="true"/>

<mx:method name="sayHelloQuery" result="handleQueryResult(event)" fault="Alert.show(event.fault.message)"/>

</mx:RemoteObject>

<mx:Button label="get Query Remote Object" click="myService.sayHelloQuery()"/>
<mx:DataGrid dataProvider="{qResult}">
<mx:columns>
<mx:Array>
<mx:DataGridColumn dataField="hello"/>
<mx:DataGridColumn dataField="world"/>
<mx:DataGridColumn dataField="exclamation"/>
</mx:Array>
</mx:columns>
</mx:DataGrid>


</mx:Application>

Viewing all articles
Browse latest Browse all 58696

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>