aspose file tools*
The moose likes Flex and the fly likes Getting data from actionscript class file into Datagrid Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Flex
Bookmark "Getting data from actionscript class file into Datagrid" Watch "Getting data from actionscript class file into Datagrid" New topic
Author

Getting data from actionscript class file into Datagrid

Nitin Menon
Ranch Hand

Joined: Jun 13, 2007
Posts: 83
Hi,
I have problem printing the values from an actionscript class. The following is my actionscript class :

package com.script.vo
{
[RemoteClass(alias="com.java.classes.vo.AdminClassVO")]
[Bindable]

public class AdminClassVO
{
public function AdminClassVO()
{
}

public var fromStation:StationVO;

public var toStation:StationVO;

public var busNumber:BusMasterVO;
}
}

The corresponding mxml code is :

<mxataGrid width="70%" height="95%" paddingLeft="40" dataProvider="{flightSectors}"
styleName="gridStyle" id="sectorsDataGrid">
<mx:columns>
<mxataGridColumn id="from" dataField="fromStation" width="150" headerText="From"/>
<mxataGridColumn id="to" dataField="toStation" width="150" headerText="To"/>
</mx:columns>
</mxataGrid>
I have written another method to fill the data into the arrayCollection variable flightSectors. The text that is displayed in the datagrid is like Object <AdminClassVO>. The actual value is not displayed.
Please help me...!
Narender Reddy Soma
Greenhorn

Joined: Jun 05, 2010
Posts: 23
Nitin Menon wrote:Hi,


public var fromStation:StationVO;

public var toStation:StationVO;


<mxataGridColumn id="from" dataField="fromStation" width="150" headerText="From"/>
<mxataGridColumn id="to" dataField="toStation" width="150" headerText="To"/>
</mx:columns>
</mxataGrid>



you are assigning an object to dataField property directly? I think you should try with object name like toStation.somefield ??
Nitin Menon
Ranch Hand

Joined: Jun 13, 2007
Posts: 83
Thank you very much. I got the solution.
 
Don't get me started about those stupid light bulbs.
 
subject: Getting data from actionscript class file into Datagrid