Adobe Dreamweaver Forums



Last 10 THreads :         Changing RadioButton Label (Last Post : justintoflex - Replies : 2 - Views : 5 )           »          Table Borders MIssing in JavaHelp (Last Post : soxmann - Replies : 3 - Views : 8 )           »          Clock .getUTC not working (Last Post : bolszo - Replies : 2 - Views : 3 )           »          cfimage error (Last Post : masoud_amen - Replies : 2 - Views : 3 )           »          Dragging components (Last Post : hsfrey - Replies : 2 - Views : 4 )           »          Is file too large? (Last Post : tweaked_eye - Replies : 0 - Views : 1 )           »          Could not find the included template (Last Post : azuro28 - Replies : 2 - Views : 3 )           »          problems linking PDFs (Last Post : Mantzi - Replies : 0 - Views : 1 )           »          flash loader reappears after movie plays (Last Post : lyshamo - Replies : 3 - Views : 4 )           »          How to turn IMAGE into MOVIECLIP??? (Last Post : Snufferson - Replies : 7 - Views : 8 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Other Macromedia/Adobe Products > Flex
 
Tags:



Reply
  #1 (permalink)  
Old 12-01-2008, 04:03 AM
amol bhandwale
 
Posts: n/a
Diggs:
Default Map Java Object to AS3 Object

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.




Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 12-01-2008, 05:03 AM
mab_bond
 
Posts: n/a
Diggs:
Default Re: Map Java Object to AS3 Object

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
Reply With Quote
  #3 (permalink)  
Old 12-03-2008, 09:33 AM
amol bhandwale
 
Posts: n/a
Diggs:
Default Re: Map Java Object to AS3 Object

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.




Reply With Quote


  #4 (permalink)  
Old 12-03-2008, 09:43 AM
amol bhandwale
 
Posts: n/a
Diggs:
Default Re: Map Java Object to AS3 Object

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.

Reply With Quote
  #5 (permalink)  
Old 12-03-2008, 04:23 PM
Karl_Sigiscar_1971
 
Posts: n/a
Diggs:
Default Re: Map Java Object to AS3 Object

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;
}
................
}

Reply With Quote
  #6 (permalink)  
Old 12-03-2008, 10:03 PM
levancho
 
Posts: n/a
Diggs:
Default Re: Map Java Object to AS3 Object

this link : http://livedocs.adobe.com/blazeds/1/..._2.html#312520

explains everything in very good details,
hope that helps
kind regards
Levan
Reply With Quote


Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 11:48 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Cheap Car Insurance - Compare Motor Insurance
Endsleigh Car Insurance Natwest Car Insurance
More Than Car Insurance Norwich Union Car Insurance
Prudential Car Insurance Zurich Car Insurance
Inactive Reminders By Mished.co.uk