I cant seem to populate a textArea dynamically in flash builder. The only tutorials I can find are populating dataGrids or drop downs using a dataProvider. Heres the code I am using:
<s:HTTPService id="noteService"
url="http://localhost/webAppIntergration%20Thur/Assignment/servicePipe.php?action=getNoteXML"
/>
The HTTPService gets sent when the app is created. And here is the textArea code I tried:
<s:TextArea text="{noteService.lastResult.notess.notes}"/>
The only thing that gets returned to the textArea is "[object Object]" so I guess I have to change it to a different type or a string before it can be output to a textArea field but i'm not 100% sure on how to do this.
Any help would be great thanks!
You can try some thing like below code to populate dynamic string to your defined text area: -
<fx:Script>
<![CDATA[
import mx.rpc.events.ResultEvent;
private function resultHandler(event:ResultEvent):void
{
//parse your result or type cast.
textArea.text = noteService.lastResult.notess.notes
}
]]>
</fx:Script>
<s:TextArea id="textArea"/>
<s:HTTPService id="noteService"
url="http://localhost/webAppIntergration%20Thur/Assignment/servicePipe.php?action=getNoteXML"
result="resultHandler(event)"
fault="trace('fault')"/>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.