Nested WorkItems and SmartParts

Topics: CAB & Smart Client Software Factory
Oct 1, 2005 at 6:43 AM
originally posted by: Tbili

I would like to use ZoneWorkspace. Each Zone would host a panel control. Panels in different zones communicate via Event Broker. Each panel would host one or more SmartParts. I don't want the SmartParts in one panel to communicate directly with SmartParts in other panels. The communication should occur only through the hosting panel.
So, my question is: can I implement panels as SmartParts that host other SmartParts, or should I implement panels as WorkItems that host SmartParts?

I would appreciate any suggestions/ideas on this!

Oct 3, 2005 at 3:30 PM
originally posted by: pfilipchyk

I am also interested in the scenario of SmartParts hosting other SmartParts: what is the appropriate way to create hosted SmartParts so that all dependency injections happen.

Barely dragging and dropping SmartParts onto hosting SmartPart, it appears, stops dependency injection at the hosting SmartPart.

In other words, if the hosted SmartPart expects a Controller to be injected, and if simply drag-and-droped onto the hosting SmartPart, the injection does not happen, not to mention "component already exists" issue.
Oct 4, 2005 at 5:16 AM
originally posted by: DLorenz

WorkItems and child workitems will work. Then there will be a smartpart that simply contains Workspaces that the child workitems will run first. Then you can run other workitems on the Workspaces of that SmartPart. (Hopefully, I didn't just confuse you.) :)
Oct 4, 2005 at 5:22 AM
originally posted by: DLorenz

What kind of data do you want to communicate between the SmartParts? You could possibly just use the same State of the main WorkItem and the data will already be there. (Just raise an event that both SmartParts catch when data changes so they can refresh it themselves.)

As for your end question, you can do it either way. If you do it the first way, then the first SmartPart that gets run into the Panel on the ZoneWorkspace would actually be a SmartPart that simply had Workspaces on it. You would run this SmartPart on the Incoming Workspace in the WorkItem:Run(). Then you would run other smartparts on the workspaces on that newly created SmartPart. However, you can only run the same SmartPart in a WorkItem once. If this is a concern, then you have to do the other approach. You would have multiple WorkItem layers, where each would have a SmartPart that simply has Workspaces on it.
Nov 4, 2005 at 8:22 PM
originally posted by: malina_amit


Have the same problem ,
does anyone have a sample to run ???