Rebinding multiple children after calling save() of root BO

Rebinding multiple children after calling save() of root BO

Old forum URL: forums.lhotka.net/forums/t/1182.aspx


longbridge posted on Monday, September 11, 2006

Hello.

I am building a windows application use C#2.0 and CSLA.NET 2.0. The GUI contains a Treeview which denotes a "parents->children->grand children" relation. User can click tree node to open the corresponding editor to edit the child business object.  In current design, when user switches to another tree node, the editor for the previous node only hides itself in the background. Opened child editors will not be closed until the main program exits.

As my understanding, after calling the Save() method of root business object, I have to rebind all the opened child editors to the right children of returned root business object.  

My question is:

I can not think of a neat solution to track all the opened child editors and finding the right child object of returned root business object to do the rebinding for each opened child editor.

What I can think of is that adding root business object as a property of child editor. But I don’t think it is a good design for component reusing.

Would you guys give me some ideas? Thanks.

 

Copyright (c) Marimer LLC