WorkItem threading issues

Topics: CAB & Smart Client Software Factory
Jun 20, 2007 at 3:03 PM
Hi everybody.

I'm try to explain you my new problem. I have a module with two views. (SearchView and ReportView)

First. When module is being loaded I registered my entity translators and I add a WebServiceProxy to WorkItem.ServicesCollection.

I load the first View, it's a client search view, so user fill some textboxes and push Search Button. This moment it makes an asynchronous calling to the web services, and loads the results in a grid.

Now becames the problem. When user double clicks in a grid row, my module lauch the second view (ReportView) and when it is being created, throws me an Exception because "WebServiceProxy is not available at this context". But, if I add this service, when the ReprtView it's being created (instead on module loading) service is got.

It's been possible that same WorkItem (I check WorkItem.ID and it's the same in ModuleController and Presenter classes) it's running in two different threads and this is problem?

How can I do for getting the services from the original thread workitem?

I hope I've explained me well.

Thank's for your attention.