This would also be a nice case for FDS and binding the model to the server.

 

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mike Anderson
Sent: Wednesday, 18 October 2006 9:51 AM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] (Cairngorm App) Advice on Deleting a VO, from a DataGrid containing an Array of VO's

 

Hello All,

I have a Cairngorm-based application. On a particular screen within
this App, I have a Products DataGrid with a DataProvider (from my Model)
assigned to it. The variable from my Model, is "productsList" - which
is an ArrayCollection populated with ProductVO's returned from the CF
Server.

With any typical Cairngorm Application, you assign your DataProvider
properties to the Model Variables - in order to keep everything
centralized & controllable.

If I have a Row selected in this DataGrid, and I want to delete this
particular Record, what is the best way to accomplish this?

On the surface, this sounds like a really simple/stupid question - BUT,
there is more to it than that.

I want to make sure that I'm doing this in a politically correct manner
- following the rules of well-written application practices. Instead of
simply blowing away the Record from the DataGrid, I want to broadcast a
Cairngorm Event, which removes the ProductsDataGrid 'selectedItem' (as a
VO possibly??) from the "productsList" ArrayCollection.

Since the "productsDataGrid.dataProvider" is bound to
"model.productsList", the changes will obviously be reflected in the
DataGrid, once I remove the item from the ArrayCollection.

BUT, I don't want this to happen, until I get a validated "True or
False" response from the ColdFusion Server - otherwise, I will get
potential consistency issues. Like - if the server is unreachable at
the moment. It would be confusing to the User, if the record got
deleted from the DataGrid, but not from the actual DataBase.

What would be the best "Full Circle" solution, to attack this problem?

Thanks in advance, for any advice on this.

Mike

__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to