我的连接 Web 部件是否应该支持 IWebPartField、IWebPartRow 和 IWebPartTable?
我一直在编写一些简单的 Web 部件,它们通过自定义接口类型进行通信。效果很好。
我有一个 ConnectionProvider 和多种 ConnectionConsumers。
我看到 OOTB SharePoint Web 部件提供了许多标准连接,显然是通过 IWebPartField 和 IWebPartRow(IWebPartTable 似乎支持较少)。
我尝试向提供程序添加 IWebPartRow 接口,但发现它实际上没有用(显然),除非它共享 OOTB 组件使用的数据,例如图像、url 和用户。好吧,这就是我的印象,无论如何......我只做了一个快速实验,发现实施和测试相当困难。
花时间尝试添加对标准 Web 部件接口的支持有什么意义吗?
I've been writing some simple webparts, and they communicate via a custom interface type. That's working fine.
I've got one ConnectionProvider, with a variety of ConnectionConsumers.
I see that the OOTB SharePoint webparts provide many standard connections, apparently through IWebPartField and IWebPartRow (IWebPartTable seems less supported).
I've tried to add a IWebPartRow interface to a provider, and found that it's not actually useful (apparently), unless it's sharing data that the OOTB components use, such as images, urls and users. Well, that's the impression I got, anyway... I've only done a quick experiment, and found it quite difficult to implement and test.
Is there any point in spending time trying to add support for the standard webpart interfaces?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Web 部件连接有点像一场噩梦,尤其是为了使它们有用,您最终将实现旧样式 2003 界面和新样式 2007 界面,因为(仅举一个示例)2007 中的 OOTB 列表 Web 部件使用旧样式界面....
是的,如果能够将 OTTB 和第 3 方 Web 部件连接到您自己的 Web 部件有意义的话。
另请查看实施 过滤器接口 - 它们通常比 IWebPartRow 等更有用。
Web part connections are a bit of a nightmare especially as to make them useful you will end up implementing both the old style 2003 interface and the new style 2007 interface because (for just one example) the OOTB list web parts in 2007 use the old style interface....
Yes if it makes sense to be able to connect OTTB and 3rd party web parts to your own web parts.
Also look at the implementing Filter interfaces - they are normally of more use than IWebPartRow etc.