ApplicationContext wrapper object, with binding?

ApplicationContext wrapper object, with binding?

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


mtagliaf posted on Tuesday, February 19, 2008

I am in the process of moving "user settings" out of a custom BusinessIdentity and into ApplicationContext.GlobalContext, so that I can modify/use these settings across application boundaries.

Back to the original application, though - there is a "Settings" form where the user can modify his settings.  When these settings were tied to a BusinessIdentity, I could use standard CSLA databinding to bind the BusinessIdentity to the form, allow editing, and get undoable goodness when/if the user hits cancel.

I'm not sure how to get the same thing in the new world, though.  My first pass at creating a wrapper for the context variables was a class with nothing but Shared properties that read/write the context variables, but I don't think I'll be able to bind this to the settings screen properly.   Do I have to create some type of BusinessBase context object wrapper just for the settings form?

thanks,
matt tag

ajj3085 replied on Tuesday, February 19, 2008

You're probably better off creating some standard business objects to store the settings.  Store the collection of settingsn memory so that your application can use them and modify them. 

Then, if they need to be changed on the server, and those changes need to make it back to the client, stick the collection in the global context. 

HTH
Andy

Copyright (c) Marimer LLC