停用 sharepoint 中的 Web 部件功能
我使用 wspbuilder 工具(具有功能的 Web 部件)开发了一个 Web 部件。
部署(到网站集)时,您必须激活该功能才能使用此 Web 部件 - 到目前为止一切顺利。
但是,当停用该功能时,Web 部件仍保留在添加它的任何网站上,而且它仍然在 Web 部件库中可用?
这是预期的行为吗?是否无法从网站集中的所有子网站中删除 Web 部件,并从 Web 部件库中删除它?
谢谢 ;)
I've developed a web part using the wspbuilder tool (Web part with feature).
When deployed (to a site collection), you have to activate the feature in order to use this web part - so far so good.
However, when deactivating the feature, the web part remains on any site where it's been added, and furthermore, it's still available in the web part gallery?
Is this expected behaviour? Is there no way of removing the web part from all subsites in the site collection, and also remove it from the web part gallery?
Thanks ;)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这是预期的行为。您可以自动删除它,但您必须编写一个功能接收器来完成此操作。
有关为 SharePoint 2007 创建功能接收器的详细信息:
http://sharepointdevwiki.com/显示/公共/如何+添加+a+功能+接收器+to+a+功能
This is expected behavior. You could remove it automatically, but you would have to write a feature receiver to accomplish that.
More info about creating a feature receiver for SharePoint 2007:
http://sharepointdevwiki.com/display/public/How+to+add+a+Feature+Receiver+to+a+Feature
当您创建 Web 部件时,WSPBuilder 会自动将删除事件接收器添加到功能中。非常方便。
WSPBuilder automatically adds the removal event receiver to the feature when you create a web part. Very convenient.
您可以使用以下代码来完成此操作:
You can do it by using the following code: