![]() |
![]() |
||||||
|
|||||||
| Tags: |
![]() |
|
|||
|
Hi All,
i have a following java value object class : eg : private long clientId; private boolean clientIdUpdated; public long getClientOrgId() { return clientOrgId; } public void setClientOrgId(long clientOrgId) { setClientOrgIdUpdated(true); this.clientOrgId = clientOrgId; } public boolean isClientOrgIdUpdated() { return clientOrgIdUpdated; } public void setClientOrgIdUpdated(boolean clientOrgIdUpdated) { this.clientOrgIdUpdated = clientOrgIdUpdated; } i need to convert into AS3 object class. Thanks. |
| Sponsored Links |
|
|||
|
You should check this link http://livedocs.adobe.com/flex/3/htm..._access_4.html in the Flex Docs the section Converting data from Java to ActionScript
|
|
|||
|
thanks for reply,
i hve created the AS3 class as follow, import com.adobe.cairngorm.vo.IValueObject; [RemoteClass(alias="com.PersonVO")] public class PersonVO implements IValueObject { private var _clientOrgId:Number; private var _clientOrgIdUpdated:Boolean; public function get clientOrgId():Number { return this._clientOrgId; } public function set clientOrgId(_clientOrgId:Number):void { billToAddrLine1Updated = true; this._clientOrgId= _clientOrgId; } public function get clientOrgIdUpdated():Boolean { return this._clientOrgIdUpdated; } public function set clientOrgIdUpdated(_clientOrgIdUpdated:Boolean):vo id { this._clientOrgIdUpdated = _clientOrgIdUpdated; } ................ } it contains other fields also. when i create a object of PersonVO and set some fields at java side i am not getting exact value for each flag corresponding to fields. eg: for string data type for some i am getting true value even though i hve not set it at client side. Thanks. |
|
|||
|
thanks for reply,
i hve created the AS3 class as follow, import com.adobe.cairngorm.vo.IValueObject; [RemoteClass(alias="com.PersonVO")] public class PersonVO implements IValueObject { private var _clientOrgId:Number; private var _clientOrgIdUpdated:Boolean; public function get clientOrgId():Number { return this._clientOrgId; } public function set clientOrgId(_clientOrgId:Number):void { clientOrgIdUpdated = true; this._clientOrgId= _clientOrgId; } public function get clientOrgIdUpdated():Boolean { return this._clientOrgIdUpdated; } public function set clientOrgIdUpdated(_clientOrgIdUpdated:Boolean):vo id { this._clientOrgIdUpdated = _clientOrgIdUpdated; } ................ } it contains other fields also. when i create a object of PersonVO and set some fields at java side i am not getting exact value for each flag corresponding to fields. eg: for string data type for some i am getting true value even though i hve not set it at client side. Thanks. |
|
|||
|
You might also want to add the [Bindable] metadata tag if you use Remote
Object or [Managed] if you use the Data Management Service. import com.adobe.cairngorm.vo.IValueObject; [Bindable] [RemoteClass(alias="com.PersonVO")] public class PersonVO implements IValueObject { private var _clientOrgId:Number; private var _clientOrgIdUpdated:Boolean; public function get clientOrgId():Number { return this._clientOrgId; } public function set clientOrgId(_clientOrgId:Number):void { clientOrgIdUpdated = true; this._clientOrgId= _clientOrgId; } public function get clientOrgIdUpdated():Boolean { return this._clientOrgIdUpdated; } public function set clientOrgIdUpdated(_clientOrgIdUpdated:Boolean):vo id { this._clientOrgIdUpdated = _clientOrgIdUpdated; } ................ } |
|
|||
|
this link : http://livedocs.adobe.com/blazeds/1/..._2.html#312520
explains everything in very good details, hope that helps kind regards Levan |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
- Contact Us
-|-
Adobe Dreamweaver Forums -|-
Archive -|-
Top -|-Rules/Disclaimer-|-Help/Support-|-Advertise