Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Pages: [1]
Print
Author Topic: How to deal with complex itemEditors (Flex)?  (Read 8283 times)
magneth
Newbie
*
Posts: 1


View Profile Email
« on: March 10, 2009, 08:50:44 »

Hi,

I'm redesigning in  PureMVC a rather "monolithic" app I've developped to learn Flex. I'm now refactoring the harder part :
my app is using an advancedDatagrid with several editors.
One of these is a complex one (multi state, multi textinput, ...). On one state, when the user has entered a name, I have to check if the name exists in the database (no way to cache data before, there are 500 000 names), via a remote object.
The database access is currently done in the ItemEditor. The ItemEditEnd event of the datagrid verify is data has been checked and allow closing of the editor or not.
How can I do that with PureMVC ? Do I need to encapsulate a lot in the editor or use a mediator ? How to instanciate it then ?
Is there any demo on this subject ?
Logged
puremvc
Global Moderator
Hero Member
*****
Posts: 2871



View Profile WWW Email
« Reply #1 on: March 12, 2009, 08:25:12 »

That itemEditor should not be making service calls. Do the calls in a proxy. The item editor can send a bubbling event, captured by the datagrid's mediator which does the check.

-=Cliff>   
Logged
Pages: [1]
Print