2 Replies Latest reply on Oct 27, 2008 7:23 AM by cspirito

    RemoteObject - Datagrid - Rows are Blank

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

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

      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?
        • 1. Re: RemoteObject - Datagrid - Rows are Blank
          SujitG Level 2
          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.
          • 2. Re: RemoteObject - Datagrid - Rows are Blank
            cspirito Level 1
            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.