Reputation: 31
I am having a function returning an XML tree structure , I wish to display the whole tree in an TextArea in flex. Here is the code:
<mx:Button id="button1" label="Submit" width="100" click="mainTxt.text=myemp.input_data(args);" />
input_data() returns XML tree .How do I send it to mainTxt TextArea ? I have tried using mainTxt.html as well.
-BHU
Upvotes: 0
Views: 689
Reputation: 858
<fx:Script>
<![CDATA[
protected function onButton1ClickHandler(event:MouseEVent):void
{
trace(myemp.input_data(args));
var xmlStr:XML = myemp.input_data(args);
mainTxt.text = xmlStr.toString();
}
]]>
</fx:Script>
<mx:Button id="button1"
label="Submit"
width="100"
click="onButton1ClickHandler(event)" />
first check this trace() if this will print correct XML-tree then you have answer.
May this will help...
Upvotes: 1