If I'm getting objects from a web service and want to use them in  
data binding, do I have to re-create them in ActionScript in order  
for their various properties and sub-objects to be bindable?

Ideally, I'd like to just "use what the server gives me" and not  
rewrite the objects in AS. i.e.:
(in my ModelLocator)
public static var userInfo:Object;

(in my GetUserCommand)
ModelLocator.userInfo = event.result[0];

(In my mxml)
<mx:Label text='{"Welcome, "+ModelLocator.userInfo.firstname+"  
"+ModelLocator.userInfo.lastname}'  />

Is it possible to get this to work like that? or will ModelLocator  
need to have something like:
public static var userInfo:UserVO;
function ModelLocator()
{
     ModelLocator.userInfo = new UserVO();
}

class com.app.path.UserVO
...


I'd rather avoid having to create all the server side objects on the  
client side; they come from the web service strongly typed, which is  
good enough for me, but does Flex need to have all of the bindable  
properties defined at complie-time for binding to work?

Thanks,
Sean



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to