Note that there are some explanatory texts on larger screens.

plurals
  1. POflex fusion charts with webservice
    primarykey
    data
    text
    <p>I have flex project where i want to call webservice and pass values from it to the xml file to update fusion chart xml My code is </p> <pre><code>&lt;fx:Script&gt; &lt;![CDATA[ import mx.controls.Alert; import mx.events.FlexEvent; import mx.rpc.events.FaultEvent; import mx.rpc.events.ResultEvent; public var PUENumber:String; protected var xmlLoader:URLLoader; [Bindable] public var avgPUEXml:XML = new XML; protected function init():void { xmlLoader = new URLLoader(); xmlLoader.addEventListener(Event.COMPLETE,setDataXML) xmlLoader.load(new URLRequest("data/AvgPUE.xml")); //Loading xml file for the chart from the folder }; protected function setDataXML(event:Event):void { avgPUEXml = XML(event.target.data); avgPUEXml.value = PUENumber; //updating chart xml value fw.FCDataXML = avgPUEXml.toString(); fw.FCRender(); }; protected function getDC_POWERdataResult_resultHandler(event:ResultEvent):void { PUENumber = getDC_POWERdataResult.lastResult; //getting value to update in xml file init(); } protected function bordercontainer1_creationCompleteHandler(event:FlexEvent):void { getDC_POWERdataResult.token = mGEMWS.getDCPUE("4","715"); //user details to get data from the method } ]]&gt; &lt;/fx:Script&gt; &lt;fx:Declarations&gt; &lt;s:CallResponder id="getDC_POWERdataResult" result="getDC_POWERdataResult_resultHandler(event)"/&gt; &lt;mgemws:MGEMWS id="mGEMWS" showBusyCursor="true" fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)"/&gt; &lt;/fx:Declarations&gt; &lt;ns1:FusionWidgets id="fw" FCChartType="Bulb" FCDataXML="avgPUEXml" /&gt; </code></pre> <p></p> <p>in the declaration am calling web service. and on creationCompelete am sending userid details to get data from webservice. now where exactly i need to call init function so that it updates xml file with values coming from web service and display the fusion widget</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload