Observer Pattern updating ReadOnly Collection

Observer Pattern updating ReadOnly Collection

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


eslater posted on Monday, September 17, 2007

I am using Petars Active Object and have ROC and ER objects where the collection subscribes to the roots event.  Lets say the ER has 2 properties Name and UserID but I want the collection to have the Username displayed instead of the UserID.

So far I have been simply adding a Username property to the ER object and setting it whenever I set the UI but I know this is not the best solution.  How are others going about it?  One answer I have considered is setting the value in DataPortal_Insert/Update.

Any suggestions are appreciated.

Elliot

Copyright (c) Marimer LLC