CSLA SIlverlight Architecture question

CSLA SIlverlight Architecture question

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

Ranjini posted on Tuesday, October 12, 2010

We are building a silverlight4 CSLA 4 application using MVVM methodology.I have a UI screen whose viewmodel is of type BusinessBase and this object has several children including BusinessBases and BusinessListBases.
Different parts of the screen have contextmenus that open childwindows permissing the edit of one small section of this object. Since the object has already been populated from the database, I would
like to avoid going back to the server.Suppose the childwindow only edits values on a particular child that belongs to a listbase that is a child of the root, I'd like to be able ot send this child
business object over to the childwindow's viewmodel. My questions are as follows

1) Is this the right approach? If not, what is?
2) What is the best way to implement this ? RIght now i have a constructor in the childwindow's viewmodel that accepts an object of this child type and sets it directly to the Model property

  public childwindowEditViewModel (BusinessObjectType businessobject)
            this.ManageObjectLifetime = false;
            this.Model = businessobject;

However if I do it this way, I am wondering how I can refresh the parent page with the child object is altered.

Please comment..


Copyright (c) Marimer LLC