Adobe Dreamweaver Forums



Last 10 THreads :         Re: Colour differences on the web (Last Post : Lundberg02@adobeforums.com - Replies : 0 - Views : 1 )           »          Re: sRGB vs. Adobe (1998) RGB (Last Post : Neil_Keller@adobeforums.com - Replies : 0 - Views : 1 )           »          Re: Using 2 Curves Layers when 1 is enough. Good idea/bad idea? (Last Post : Ramón_G_Castañeda@adobeforums.com - Replies : 0 - Views : 1 )           »          cs4 full screen mode isn't saved in workspaces, unlike cs3 (Last Post : eddie caruso - Replies : 0 - Views : 1 )           »          delete all channels previously created by "save selection" (Last Post : Paul_R@adobeforums.com - Replies : 1 - Views : 2 )           »          Emailing Content of CFML page (Last Post : Fetch - Replies : 2 - Views : 3 )           »          cfapplication in Application.cfc (Last Post : tgoold - Replies : 5 - Views : 6 )           »          Table cell - text formatting question (Last Post : Walt F. Schaefer - Replies : 8 - Views : 9 )           »          Can I make a 4 state CSS Sprite nav bar. (Last Post : Team Liquid Fire - Replies : 6 - Views : 7 )           »          Re: Paint, erase, burn and dodge won't work for me in CS4 (Last Post : John Joslin - Replies : 0 - Views : 1 )           »         


User Info Statistics
Go Back   Adobe Dreamweaver Forums > Macromedia Software > Flex
 
Tags:



Reply
  #1 (permalink)  
Old 11-04-2008, 09:02 AM
cspirito
 
Posts: n/a
Diggs:
Default RemoteObject - Datagrid - Rows are Blank

I created a RemoteObject which connects to the destination correctly.

<mx:RemoteObject = "msn" destination="mission" result="resultFunction(event)"
/>

The event.result is:

(mx.collections::ArrayCollection)#0
filterFunction = (null)
length = 43
list = (mx.collections::ArrayList)#1
length = 43
source = (Array)#2
[0] (Object)#3 ...

The datagrid is defined as:

<mxataGrid dataProvider="{msn.getData.lastResult}" width="100%" height="254"
id="missionDataGrid" y="0" x="0">
<mx:columns>
<mxataGridColumn headerText="id" datafield="id"/>
<mxataGrid.../>
</mx:columns>
</mxataGrid>

I can't seem to get the data to display even though the grid populates with
the correct number of rows.

Has anyone else seen this?



Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 11-04-2008, 09:02 AM
SujitG
 
Posts: n/a
Diggs:
Default Re: RemoteObject - Datagrid - Rows are Blank

Hi,

The property is dataField and not datafield. Also please check if the property
name and the value in the dataField is correct. Please check the code below.

Hope this helps.

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
<mx:Script>
<![CDATA[
import mx.collections.ArrayCollection;
import mx.controls.Alert;
import com.adobe.ToDelete;

[Bindable]private var coll:ArrayCollection;

private function populateData():void
{
coll = new ArrayCollection();
var obj:Object = new Object();
obj.id = "1";
coll.addItem(obj);
obj = new Object();
obj.id = "2";
coll.addItem(obj);
}

]]>
</mx:Script>
<mx:Button id="btn" label="do it" click="populateData()"/>
<mxataGrid dataProvider="{coll}"
width="100%" height="254"
id="missionDataGrid">
<mx:columns>
<mxataGridColumn headerText="id" dataField="id"/>
</mx:columns>
</mxataGrid>

</mx:Application>

Reply With Quote
  #3 (permalink)  
Old 11-04-2008, 09:02 AM
cspirito
 
Posts: n/a
Diggs:
Default Re: RemoteObject - Datagrid - Rows are Blank

Sujit,

Thanks for your reply. I should have been a little more clearer. The
ArrayCollection is returned from LCDS and when looking at event.result I see:

(mx.collections::ArrayCollection)#0
...
...
[0] (package::Class)#3
var1 = (null)
var2 = (null)
var3 = (null)

In the destination class I even check the return value before I send it:

Class clVar = (Class)returnArrayList.get(index);
String sVar = clVar.getVar();
System.out.println(sVar);

and in catalina.out all of the values are there.

So the ArrayCollection is being correctly assigned to the correct Class - but
the data is showing up as (null). Very frustrating.



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:25 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