SmartPart Communication

Topics: CAB & Smart Client Software Factory
Aug 24, 2006 at 8:12 AM
originally posted by: pfeds

I am considering the best practice of how to communicate between two SmartParts on a view. I have a Project -> Resources style of view that shows a ProjectTreeView SmartPart in the top half of the screen and a ProjectResourcesList SmartPart in the bottom half.

When a Project is selected in the Project TreeView SmartPart I want the Resources to update in the bottom SmartPart.

Should I define events for this communication?

Additionally, when the view is displayed I want the ProjectTreeView to load a list of Projects for the logged in user. Do I do this from the containing view (which is also a smartpart) by accessing the WorkItems SmartPart catalogue to get a handle for the ProjectTreeView SmartPart, or do I also definte an event for this??

Sorry if any of this is noddy stuff but I'm trying to start off using good practice...

...thanks in advance.
Aug 24, 2006 at 8:16 AM
originally posted by: askew

Within the same View, you should have access to other SmartParts directly.
Between Views or Modules, you would look at the Event Broker.
I don't see any reason to use the Event Broker for "intra-View communication".

For the second question, I would look at the Event Broker indeed.
Aug 24, 2006 at 11:06 PM
originally posted by: pfeds

Yep, that's helped a lot askew, thanks.