MOSS 2007:如何以编程方式存储用户的 Web 部件属性?
我有一个 Web 部件,它以 3 种不同格式之一显示数据。通过单击 Web 部件中的 3 个按钮之一来选择格式。这很好用。
已发出请求来存储最后选择的状态,以便用户不必总是单击他们喜欢的视图。
定义一个属性并定义 Personalized(PersonalizationScope.User) 似乎是合乎逻辑的,但这似乎对大多数用户不起作用,因为他们只有页面的读取权限。
最好的前进方向是什么? Sharepoint 是存储此类信息的正确位置还是我应该使用自己的存储空间?
谢谢
I have a web part which shows data in one of 3 different formats. The format is selected by clicking one of 3 buttons in the web part. This works fine.
A request has come through to store the last selected state so that the user does not always have to click their favourite view.
It seemed logical to define a Property and define Personalizable(PersonalizationScope.User) but this does not seem to work for most users as they only have Read rights for the page.
What is the best way forward here? Is Sharepoint the right place to store such info or should I be using my own storage?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用您自己的存储是一种选择,但这意味着您需要进行更多的开发工作。这个选项怎么样。
修改您的 Web 部件并将选项添加到 Web 部件属性。
创建新的权限级别并添加以下权限
这将确保具有只读访问权限的用户只能更新 Web 部件。
第 2 步将允许他们修改所有 Web 部件。您可以修改每个 Web 部件,并针对您不希望用户编辑的 Web 部件删除以下选项。
允许在个人视图中编辑[高级]
通过这种方式,您可以锁定除您想要的 Web 部件之外的所有 Web 部件。
Using your own storage is an option but this means its some more development work for you. How about this option.
Modify your WebPart and add the option to the Web Part property.
Create a new permission level and add the following permission
This will make sure that users with read only access can only update webparts.
Step 2 will allow them to odify all webparts. You can modify each webpart and remove the following option for webparts which you dont want you users to edit.
Allow Editing in Personal View [Advanced]
This way you can lock all webparts except the one you want.