Hi.
I've got two pretty simple webparts, one contains a treeview, and one displays a literal with some text(it actually does some more things, but none relevant). This text is being read from a connection to the first webpart, which provides the currently selected node. This was working great until recently(I don't know the exact time when this stopped working as a coworker pointed out that it had stopped), when it just died. I slapped in some breakpoints, and I found that the contract variable is being read, and being null, is ignored. Not until after this has happened is the contract variable set to a value by the treeview webpart. My guess is that it's because the second webpart is being started before the first. Does anyone know how I can force the first webpart to start and run first?
Code snippet time!
1 protected systeam.evolution.web.webpart.contracts.ISelectedTreeNodeContract Contract {
2 get { return _contract; } // Called first, from CreateChildControls
3 set { _contract = value; } // Called second, from GetInterfaceForConnection(the ConnectionConsumer).
4 }
5
6 [ConnectionConsumer("Node Consumer", "TreeNodeConnection")]
7 public void GetInterfaceForConnection(systeam.evolution.web.webpart.contracts.ISelectedTreeNodeContract contract) {
8 Contract = contract;
9 }
Ideas would be greatly appreciated
Best regards,
Eric Johansson
SYSteam Evolution
www.systeam.se