获取多页面会议工作区的页面

发布于 2024-07-14 22:31:56 字数 589 浏览 8 评论 0原文

我目前对多页会议工作区模板进行了一些测试,以检查它是否符合我们作为项目基本模板的需求。

您可能知道,多页面会议工作区旨在能够管理单个工作区中的多个日期,并显示仅与特定日期相关的页面或应在每个日期出现的页面。

如果您使用 SharePoint Designer 检查多页面会议工作区,您可以看到有一个包含工作区所有页面的库。 每个日期显示的页面都存储在根文件夹中,仅在单个日期显示的页面存储在以相应日期命名的文件夹中。

现在我们来谈谈我的问题。 为了设置每个日期显示的单个页面的权限,我遍历页面库以查找要更改权限的页面。 奇怪的是,该库的 ListItemCollection 假装包含我期望它包含的页数。 但是,当我迭代该集合时,它只返回附加到实际日期的页面。 它既不返回应在每个日期显示的页面,也不返回其他日期的页面。

我已经尝试使用 SPSecruity.RunWithElevatedPrivilges() 并模拟系统帐户来获取页面。 我还尝试通过命令行应用程序获取它们,而不使用任何上下文信息。 对象模型似乎也遵循这样的行为:您只能获取与特定日期相关的项目。

那么,无论实际日期如何,我怎样才能获取多页会议工作区的所有页面???

I currently do some testings on the multipage meeting workspace template to check whether it fit our needs to be the base template for our projects.

As you might know, a multipage meeting workspace is designed to be able to manage several dates within a single workspace and to display either pages that are only related to a certain date or pages that should appear on every date.

If you examine a multipage meeting workspace with SharePoint Designer you can see that there is a library which contains all the pages of the workspace. Pages that are displayed on every date are stored in the root folder, pages that are only displayed on single dates are stored in folders which are named with the according date.

So now we come to my problem. In order to set the permission for a single page that is displayed on each date, I iterate over the page library to find the page I want to change the permissions on. Strangely, the ListItemCollection of the library pretend to contain the number of pages I expected it to contain. But when I then iterate over the collection it only returns the pages that are attached to the actual date. Neither does it return the pages which should be displayed on every date nor the pages for the other dates.

I have already tried to get the pages by using SPSecruity.RunWithElevatedPrivilges() and with impersonation as the system account. I've also tried to get them via a command line application without using any context information. It seems as the behavior, that you can only get the items which are related to a certain date, is also followed by the object model.

So how could I get all pages of a multipages meeting workspace regardless of the actual date???

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

眸中客 2024-07-21 22:31:56

您可以在工作区创建时刻捕获事件,并在事件中以编程方式设置权限。 您可能想了解有关 事件接收器以编程方式设置权限

您提到的那些页面是添加到名为“会议系列”的列表中的项目
替代文本 http://img22.imageshack.us/img22/8963/ss20090528181724.png< /a>

它包含以下字段:

替代文本 http://img22.imageshack.us/ img22/351/ss20090528181819.png 替代文本 http://img22.imageshack .us/img22/7857/ss20090528181852.png

来自 1 项的示例数据(未按提到的列的顺序排列):

3   0x001C4383A41E441842A2A27CA249FED28F    Meeting Series  Recurrence  2009-05-28 18:11:20 2009-05-28 18:11:12 1073741823;#Sistēmas konts  1073741823;#Sistēmas konts  1   1   512 1.0 0   0   Recurrence  Recurrence  3   100.000000000000    {A6E54DB5-3A60-464B-A9A0-D314B49C41E8}  3;#test2/Recurrence/Lists/Meeting Series/1_2.000    3;#test2/Recurrence/Lists/Meeting Series    3;#2009-05-28 18:11:20  3;#2009-05-28 18:11:20  3;#0    0x7fffffffffffffff  3;#1_2.000  3;#{6BE299E5-E81F-40A8-80B2-41494DF0353C}   3;# 3;#{965D0DB3-1AE0-4C23-B006-FB4FC1FE1AB7}   1_2.000 3   1_2.000 1_2.000 /test2/Recurrence/Lists/Meeting Series/1_2.000  http://test:10000/test2/Recurrence/Lists/Meeting%20Series/1_2.000   1_2 3;# 1   1   2   {D8839339-6DDA-48A6-B3B7-FBCA58C8B436}  2009-06-03 19:00:00 2009-06-03 19:00:00 (null)  (null)  (null)  0   1   (null)  0   0   0   2009-05-28 18:10:57 (null)  http://test:10000/test2/Lists/Calendar, Kalendārs   2009-06-03 19:00:00

You can catch an event on workspace creation moment and at the event set permissions programmatically. You may want to know more about event receivers or setting permissions programmatically.

Those pages you mentioned are items added to a list called "Meeting Series"
alt text http://img22.imageshack.us/img22/8963/ss20090528181724.png

It contains following fields:

alt text http://img22.imageshack.us/img22/351/ss20090528181819.png alt text http://img22.imageshack.us/img22/7857/ss20090528181852.png

Example data from 1 item (not in tat order as columns are mentioned):

3   0x001C4383A41E441842A2A27CA249FED28F    Meeting Series  Recurrence  2009-05-28 18:11:20 2009-05-28 18:11:12 1073741823;#Sistēmas konts  1073741823;#Sistēmas konts  1   1   512 1.0 0   0   Recurrence  Recurrence  3   100.000000000000    {A6E54DB5-3A60-464B-A9A0-D314B49C41E8}  3;#test2/Recurrence/Lists/Meeting Series/1_2.000    3;#test2/Recurrence/Lists/Meeting Series    3;#2009-05-28 18:11:20  3;#2009-05-28 18:11:20  3;#0    0x7fffffffffffffff  3;#1_2.000  3;#{6BE299E5-E81F-40A8-80B2-41494DF0353C}   3;# 3;#{965D0DB3-1AE0-4C23-B006-FB4FC1FE1AB7}   1_2.000 3   1_2.000 1_2.000 /test2/Recurrence/Lists/Meeting Series/1_2.000  http://test:10000/test2/Recurrence/Lists/Meeting%20Series/1_2.000   1_2 3;# 1   1   2   {D8839339-6DDA-48A6-B3B7-FBCA58C8B436}  2009-06-03 19:00:00 2009-06-03 19:00:00 (null)  (null)  (null)  0   1   (null)  0   0   0   2009-05-28 18:10:57 (null)  http://test:10000/test2/Lists/Calendar, Kalendārs   2009-06-03 19:00:00
下壹個目標 2024-07-21 22:31:56

仅当用户尝试访问此类事件的页面时才会创建它们。 这是设计使然,我发现的唯一解决方案是尝试通过网站(或某些仿真)访问页面,然后尝试通过代码访问它们。

关于 Flo 的评论,我在 Microsoft Sharepoint 2007 Development unleashed(sams,ISBN 0-672-32903-4)上找到了来源。 第 101 页上说:

注意

从定期会议中获取数据
可能很棘手。 你可能会遇到
您的代码尝试的情况
访问会议的列表项
尚未发生的事件
在会议系列中配置
列表。 为了确保个人
实例已创建,您可以

实例的主页,例如:
http://server/sites/mymeeting/default.aspx?InstanceID=20061012

如果您找到其他方法,请发布它,这将为我们节省很多精力!

The pages for this kind of events get created only when a user tries to access them. This is by design, and the only solution I found was to try and access the page via the website (or some emulation) and then try to access them by code.

Regarding Flo's Comment, I fount the source for this on Microsoft Sharepoint 2007 Development unleashed (sams, ISBN 0-672-32903-4). on p 101 says:

CAUTION

Obtaining data from recurring meetings
can be tricky. You might encounter
situations in which your code attempts
to access a list item for a meeting
occurrence that has not yet been
provisioned in the Meeting Series
list. To ensure that the individual
instance has been created, you can
make a dummy web request to the
instance’s home page, for example:
http://server/sites/mymeeting/default.aspx?InstanceID=20061012

If you find another way, please post it It will save us lots of effort!!!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文