Take a look at data binding http://livedocs.adobe.com/flex/3/html/help.html?content=databinding_1.html
Regards, PS On Thu, Jun 4, 2009 at 6:33 PM, markfu...@rocketmail.com < markfu...@rocketmail.com> wrote: > > > I have been trying to wrap my head around flex/actionscript for several > weeks now...I'm a little slow. I'm using Coldfusion as an application server > with Flash Remoting. > > So far, I've been able to get info from the database to a datagrid and > after pulling several hundred hairs out of my head, figured out how to get a > new record into the database from flex...with one small caveat...in the code > below, I cannot un-comment the last line > (//dataEstimateFixedItem.PricePerUnit = PricePerUnit.text;)as it causes an > error...trying to put text into a numeric field (the value is a number)...Do > I have to cast it as a number or something? > > private function addEditItemInsertHandler():void > { > var dataEstimateFixedItem:EstimatesFixedItems = new EstimatesFixedItems(); > > > > dataEstimateFixedItem.ConstructionPhase = > ConstructionPh.selectedItem.ConstructionPhaseId; > dataEstimateFixedItem.JobEstimateType = > JobEstimateType.selectedItem.JobTypeId; > dataEstimateFixedItem.ItemType = ItemType.selectedItem.ItemTypeId; > dataEstimateFixedItem.DefaultUnitType = > DefaultUnitType.selectedItem.DefaultUnitTypeId; > dataEstimateFixedItem.ItemName = ItemName.text; > dataEstimateFixedItem.ItemDescription= ItemDescription.text; > > //dataEstimateFixedItem.PricePerUnit = PricePerUnit.text; > > > EstimatesFixedItemsGateway.save(dataEstimateFixedItem); > AddForm.height = 5; > > > } > > uh...the code looks a little butt ugly...is there a better way to attach > code? > > Thanks, > > Mark Fuqua > > > -- /** * Pedro Sena * Systems Architect * Sun Certified Java Programmer * Sun Certified Web Component Developer */