Gang-
  I'm a newbie and all the flexdocs on MM's site couldn't give me a
concrete answer. I have a datagrid that is populated from an ArrayList
of POJO's (using the remote object). That works fine. 

I then have another method that is called 30 seconds later then
returns a single POJO (of the same type from the POJOs returned in the
first method). I then try to add it to my datagrid using the
myDatagrid.addItem(newObj), but I get the below debug error.

Warning: Reference to undeclared variable, '_global.com.MyPojo'
        at mx_utils_ClassUtil::findClass()
Warning: valueOf is not a function
        at mx_utils_ClassUtil::getFlexClass() 

Is there a special way I need to declare 'newObj' (which I pass into
the datagrid.addItem() method), or do I have to explicity write the
AS-equilavent class of my Java POJO class?  

I would think Flex could convert this class for me, but I'm obviously
missing an important step to add it to the datagrid/dataprovider.
Thanks in advance for your help.

<mx:script...>
var newObj:Object;
function addToGrid() {
  newObj = remoteObj.getNewJob();  
  myDataGrid.addItem(newObj); 
}
</mx:script>

<mx:DataGrid id="myDataGrid" dataProvider="{remoteObj.getAll.result}">
...




 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to