Adobe Flex

ClassMappings between WebORB and Adobe Flex

Basically there are three methods to obtain a classmapping between WebORB and Adobe Flex.

1. ClassAlias in WebORB configuration.
2. ClassAlias in your ActionScript code through the “registerClassAlias” class.
3. ClassAlias in your ActionScript classes through the RemoteClass metatag.

1. ClassAlias in WebORB configuration
Add the following to your WebORB configuration file (This can also be done through the WebORB management console):

Name of ClientClass
Name of ServerClass
Name of assembly

2. ClassAlias in your ActionScript code through the “registerClassAlias” class.

var clientClass:Class = getDefinitionByName( clientClassName ) as Class;
registerClassAlias( serverClassName, clientClass );

3. ClassAlias in your ActionScript classes through the RemoteClass metatag.

[RemoteClass(alias=”com.companyname.namespace.ClassName”)]

The result is almost identical (some differences in behavior exists, but outside the scope of this short note) and will eventually mean that serverclasses returned and send to the server will be serialized and deserialized between the two class-definitions automatically by the WebORB server and the Flas Player respecitively.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s