Hi all,

I'm wondering what is the difference between adding an item to a
managed collection (one gotten from a fill() call) and actually using
the DataService.addItem() function.

In the CRM sample, it seems they do it both ways. The code to add a
company uses DataService.addItem(), and the code to add an employee
simply adds the employee to the employees collection.

It appears both have the same affect, in that they are both committed
to the database immediately, however the approach of adding to the
managed collection doesn't seem to be working in my environment.

Just wondering what the differences between these approaches would be.

thanks,
Thunder

P.S. my fill code and add code from my delegate are included below.
_______________

public function getDashboards() : void
{
call =
service.fill(
  ConfigModelLocator.getInstance().dashboards,
  "DashboardsByApplicationid",
  [ConfigModelLocator.getInstance().applicationid]);

service.addEventListener(mx.rpc.events.ResultEvent.RESULT,responder.onResult);
service.addEventListener(mx.rpc.events.FaultEvent.FAULT,responder.onFault);
}

public function addDashboard(dashboard:DashboardVO):void
{
// validation stuff removed
// add the dashboard to the dashboards collection
var dashboardsCol:ArrayCollection =
ConfigModelLocator.getInstance().dashboards;
dashboardsCol.addItem(dashboard);
}





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
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