The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

galiya (3) [Avatar] Offline
#1
Hello!

I would be grateful if you could help me / hint me on the issue I'm struggling with at the moment.

I try to implement connection (using custom connection interface) between 2 custom web parts on different pages, essentially a "master-detail" behaviour.

If I add both web parts on the same page, they can be connected successfully. But for some reason I can't see any "Connections" menu among the options for the "provider" web part.

Do you know by any chance what could be the issue, or possibly you may know what has to be implemented additionally to connect 2 web parts located on different pages.

Thanks in advance.

Galiya

P.S. Thanks a lot for a great job on the book!
wictor.wilen (29) [Avatar] Offline
#2
Re: custom webparts connection on different pages
Hi,
thanks for the encouraging words.

Cross-page connections are not supported by the ASP.NET Web Part infrastructure. It was(is) supported by the old SharePoint Web Part framework, but I do not recommend you to use it - since it will likely not be supported in the future.

There is a way to work around this (which is something I left out of the book). It takes a little effort. You need to create a proxy Web Part that (either a combined or two). You need to add one on the master page and one on the detail page. The proxy Web Part is responsible for the cross-page communication. So when your master WP (connected to the master proxy) is updated the proxy updates the detail proxy on the detail page (using some clever code). And when you browse the detail page the detail WP retrieves the data from the detail proxy.
I hope you get what I'm trying to say.

Good luck
galiya (3) [Avatar] Offline
#3
Re: custom webparts connection on different pages
Hi Wictor!

Thank you so much for such a detailed and quick response!

Yes, I see what you mean, though if I may I'd be grateful to clarify few bits. Please forgive my ignorance, as I moved from ASP.NET background to Sharepoint platform very recently.

The proxy web part you mentioned- is it a specific web part type? Or just some web part which will implement cross-page communication behavior and we call it "proxy"? If this is the former, can you suggest where I could read about it in more detail (quick google search didn't show anything remotely useful except this (http://bit.ly/9ZEFos)?

Secondly, the "clever code" of the proxy web part smilie In my scenario of master-detail view, do you think I could store Detail_id in some session variable, to be picked up on the detail page? Or there could be different methods accessing the proxy web part data?
I hope i explained it more or less clearly.

I really appreciate your time and help!

Regards,
Galiya
wictor.wilen (29) [Avatar] Offline
#4
Re: custom webparts connection on different pages
Hi,
the proxy web part is just a concept - not a specific type of web part.
To get a similar idea check out Nikhil Kotharis couple of years old post at: http://www.nikhilk.net/CrossPageConnections.aspx
/WW
galiya (3) [Avatar] Offline
#5
Re: custom webparts connection on different pages
Hi Wictor,

thanks a lot! WIth that link to Nikhil's idea, everything is clear now.

Galiya
wictor.wilen (29) [Avatar] Offline
#6
Re: custom webparts connection on different pages
Awesome!

Good luck with the Web Parting!

/WW