kannanMugundan
Jun 15th, 2009, 04:11 AM
Hi,
I know this may be irrelevant place to ask this question, but as i did not find help in flex forum and since it is related to blaze DS, I hoping to get some help.
I have 2 Action Script class binded to remote java class
Class 1
package hmil.setup.model
{
import hmil.com.general.model.Employee;
[Bindable]
[RemoteClass(alias="hmil.setup.model.Area")]
public class Area
{
public function Area()
{
}
public var ARMST_AREA_ID:int;
public var ARMST_CMPN_NO:String;
public var ARMST_CORP_NO:String;
public var ARMST_SCTN_TYPE:String;
public var ARMST_CRTE_USR_NO:String;
public var ARMST_CRTE_TIME:Date;
public var ARMST_UPDT_USR_NO:String
public var ARMST_UPDT_TIME:Date;
public var ARMST_DLR_LIST:ArrayCollection;
public var ARMST_EMP:Employee;
}
}
Class 2
package hmil.com.general.model
{
[Bindable]
[RemoteClass(alias="hmil.com.general.model.Employee")]
public class Employee
{
public function Employee()
{
}
public var EPMST_ID:Number;
public var EPMST_CMPN_NO:String;
public var EPMST_CORP_NO:String;
public var EPMST_EMP_NO:String;
public var EPMST_DLR_NO:String;
public var EPMST_EMP_NAME:String;
}
When the remote java method returns a list of Area objects through Blaze DS this list can be assiged as data to the Data Grid
The DataGridColumn dataField can be mapped to the column name and it displays properly
<mx:DataGridColumn dataField="ARMST_AREA_ID" headerText="Id"/>
But lets say I wanted to display the child value (ARMST_EMP.EPMST_ID ) in the Data Grid
Since the sever returns the Parent Java Object which contains the related Employee as inner Object.
The Objetcs are deserialized to AS class objects.
But how to display the child columns in data grid.
If i give the data field as ARMST_EMP it is displayed as Object. but if i mention the datafield as ARMST_EMP.EPMST_ID, it does not display anything.
please let me know how to display the child object in datagrid
Thanks
I know this may be irrelevant place to ask this question, but as i did not find help in flex forum and since it is related to blaze DS, I hoping to get some help.
I have 2 Action Script class binded to remote java class
Class 1
package hmil.setup.model
{
import hmil.com.general.model.Employee;
[Bindable]
[RemoteClass(alias="hmil.setup.model.Area")]
public class Area
{
public function Area()
{
}
public var ARMST_AREA_ID:int;
public var ARMST_CMPN_NO:String;
public var ARMST_CORP_NO:String;
public var ARMST_SCTN_TYPE:String;
public var ARMST_CRTE_USR_NO:String;
public var ARMST_CRTE_TIME:Date;
public var ARMST_UPDT_USR_NO:String
public var ARMST_UPDT_TIME:Date;
public var ARMST_DLR_LIST:ArrayCollection;
public var ARMST_EMP:Employee;
}
}
Class 2
package hmil.com.general.model
{
[Bindable]
[RemoteClass(alias="hmil.com.general.model.Employee")]
public class Employee
{
public function Employee()
{
}
public var EPMST_ID:Number;
public var EPMST_CMPN_NO:String;
public var EPMST_CORP_NO:String;
public var EPMST_EMP_NO:String;
public var EPMST_DLR_NO:String;
public var EPMST_EMP_NAME:String;
}
When the remote java method returns a list of Area objects through Blaze DS this list can be assiged as data to the Data Grid
The DataGridColumn dataField can be mapped to the column name and it displays properly
<mx:DataGridColumn dataField="ARMST_AREA_ID" headerText="Id"/>
But lets say I wanted to display the child value (ARMST_EMP.EPMST_ID ) in the Data Grid
Since the sever returns the Parent Java Object which contains the related Employee as inner Object.
The Objetcs are deserialized to AS class objects.
But how to display the child columns in data grid.
If i give the data field as ARMST_EMP it is displayed as Object. but if i mention the datafield as ARMST_EMP.EPMST_ID, it does not display anything.
please let me know how to display the child object in datagrid
Thanks