views:

13

answers:

1

Hi there,

I use this resultHandler and instead of using my data with four(4) separate field I would like to use the following code in one field. and as a one line read out? E.g (title + "." +firstName + " " + middleName + " " + last Name) = (Mr. Harald E. W. Buttweiser).

I get it with static Xml e.g. models but cant find the right way to get it with my Http!

        <mx:Script>
        <![CDATA[

            /* import mx.rpc.events.ResultEvent; */

            private function resultHandler(evt:ResultEvent):void {

            title.text = evt.result.message.title;
            firstName.text = evt.result.message.firstName;
            middleName.text = evt.result.message.middleName;
            lastName.text = evt.result.message.lastName;
        }
        ]]>
    </mx:Script>

Thanks in advance aktell

A: 

You can do it in one line if you want. Define an object for these fields, like:

[Bindable]
private var contact:Object;

Than adopt your fields' source attribute:

<mx:TextInput text="{contact.title}"/>
<mx:TextInput text="{contact.firstName}"/>
...

And in the callback you can call:

contact = evt.result.message;
itarato