Tuesday, November 25, 2008

Bind Java Object to Flex Object

To represent a server-side Java object in a client application, you use the [RemoteClass(alias=" ")] metadata tag to create an ActionScript object that maps directly to the Java object. You specify the fully qualified class name of the Java class as the value of alias. This is the same technique that you use to map to Java objects when using RemoteObject components.

You can use the [RemoteClass] metadata tag without an alias if you do not map to a Java object on the server, but you do send back your object type from the server. Your ActionScript object is serialized to a Map object when it is sent to the server, but the object returned from the server to the clients is your original ActionScript type.

1. write a bindable class and attach the [RemoteClass] tag.
2. use this class in your main flex code.

sample code:
blazeds-rc-server-tutorial.rar and blazeds-rc-client-tutorial.rar , enjoy it.

No comments:

Post a Comment