Object from Event into Array collection


i using flash builder 4 , working on air app. have tab navigator in app , popup allows user create order. can click on add button add items order, adds rows datagrid. when click save event actionscript class fired off , passes order info orderitems object needs added array collection in main app displayed in pending orders page. order info goes through fine.

 

i having trouble figuring out how add event.orderitems object localorderitems:arraycollection orders use this, storing orders stored object when pc offline can submit them once online. shows first item in list , have exit , renter see items.

 

 

 

 

 

 

private function saveorder(event:saveorder):void

{

 

 

// store orders

 

 

var order:order = new order();

order.storeid = event.storeid;

order.orderuid = event.orderuid;

localorders.additem(order);

localordersso.data.orders = localorders;

localordersso.flush();

 

 

//store order items

 

 

 

 

localordersitemsso.data.items = event.orderitems;

 

localordersitemsso.flush();

 

 

popupmanager.removepopup(createorderscreen);

}

 

 

 

you can use localorderitems.source @ array that's in arraycollection.  can manipulate other array, use .push() add new item.



More discussions in Flex (Read Only)


adobe

Comments

Popular posts from this blog

CS5 Adobe Media Encoder: Encode failed because the source duration is nil.

cf_sql_integer vs cf_sql_bigint vs cf_sql_int??

localhost/joomla15/administrator doesnt work - Joomla! Forum - community, help and support