choral's blog

SharePoint, Office, File Formats
随笔 - 87, 评论 - 477, 引用 - 20

导航

关于

Books I Co-authored


Books I Contributed To

Books Read and Reading









标签

每月存档

最新留言

广告

“通向分享”首次SharePoint培训开始报名

[更新]由于电信机房故障,CollaDec网站可能暂时无法访问。如果对此培训有任何问题,请尽管发消息给我,发送地址为:

http://blog.joycode.com/choral/contact.aspx

[更新]机房已修复,CollaDec已可正常访问,欢迎大家报名!

----------------------------------------------------------------------------------------------------------------------

不知疲倦的“通向分享”培训团队将在“SharePoint普及日”之后隆重推出首次SharePoint系统培训!

此次培训将分为两个部分:

1、为期3天的SharePoint应用管理培训(2007年6月22/23/24日)

日期 课程概要
2007年6月22日 MOSS2007概述
SharePoint基础应用(上)
SharePoint基础应用(下)
MOSS2007配置与管理
2007年6月23日 MOSS2007搜索的配置与使用
MOSS2007企业内容管理解决方案
MOSS2007Web内容管理
2007年6月24日 BDC业务数据目录应用
Excel Services 应用
SharePoint Designer应用
MOSS2007中的工作流

 2、为期2两天的SharePoint开发培训(2007年6月30日/7月1日)

日期 课程概要
2007年6月30日 SharePoint开发概览
SharePoint对象模型揭秘:编程访问列表与文档库
SharePoint事件处理程序开发
SharePoint站点定义
2007年7月1日 在SharePoint平台上开发和部署Web部件
SharePoint平台上的工作流开发
SharePoint自定义列表字段类型

应用管理部分详细课表

开发部分详细课表

这次培训将由我跟了不起的Erucy(杜伟)主讲。

地点设在北京市海淀区知春路108号豪景大厦A座901-904室(北京三达培训基地)

收费标准为RMB1000/人天,如果同时报名5天的课程,可以打9折

详细内容参考这里:http://www.colladec.com/content.aspx?ID=17

想直接报名的话,点击这里:http://www.colladec.com/class.aspx

posted on 2007-05-29 18:29:00 by choral  评论(21) 阅读(5709)

通向分享SharePoint普及日!

时间终于确定下来了,2007年6月9日,微软中国北京总部(霄云路现代汽车大厦18层200人会议室)

届时我和杜伟将贡献4个SharePoint应用和开发的概述性课程:

#1. SharePoint企业应用概览

#2. SharePoint基础概念补习

#3. 在SharePoint中开发Web部件

#4. SharePoint对象模型概览及其他开发机会

无论您是SharePoint新手还是SharePoint专家,都被邀请来参加这次免费活动。

报名请进入此页面:http://www.colladec.com/SharePointDay.aspx

感谢OTEC(微软Office技术专家俱乐部)的支持,这是CollaDec成立以来第一次公开活动,也感谢所有朋友的支持,通向分享将在6月底推出首次SharePoint培训:6月22、23、24日三天的应用管理培训,6月30日、7月1日两天的开发培训,详细信息将近期发布

  

posted on 2007-05-24 00:40:00 by choral  评论(13) 阅读(5861)

用SharePoint Designer定制SharePoint数据显示界面

Sunmoonfire在他的新文章中介绍了如何用SharePoint Designer修改SharePoint列表数据显示样式的方法,非常适合不懂编程的IT管理人员学习!链接如下:

http://www.cnblogs.com/Sunmoonfire/archive/2007/05/22/755968.html

另外,问个问题,有谁知道怎么在自己的WebPart里Render出来一个DataViewWebPart(WSSv3)?或者根本不可能?

posted on 2007-05-23 16:17:00 by choral  评论(9) 阅读(6742)

哦!这些怎可能是SharePoint网站!!

记得给大家介绍过基于SharePoint制作的相当漂亮的“夏威夷人航空公司”网站,现在又有一个非常漂亮的基于SharePoint的站点“SENDTEC”在上个月发布了:

http://www.sendtec.com/default.aspx

夏威夷人航空公司:

谁说SharePoint不能构建缤纷漂亮的Internet网站??

另外,如果你对这个SharePoint社区工具包感兴趣,可以到这里去试用:

http://sharepoint.microsoft.com/sharepoint/cks/uge-cn/default.aspx

posted on 2007-05-21 01:47:00 by choral  评论(14) 阅读(9570)

千呼万唤始出来的“ELEVEN首页”

目前能找到的SharePoint资源最全面的(繁体)中文网站之一!

站长为享誉QQ群组的“十一”先生!

http://sharepoint.idv.tw/Pages/default.aspx

另外,发现了在事件处理程序中虚拟管理员权限的issue,请看这篇文章的更新:一个SharePoint事件处理程序实例

posted on 2007-05-17 10:15:00 by choral  评论(6) 阅读(6130)

几个留作备忘的链接

我原来总被问道为什么SharePoint2007里没有那个网页查看Web部件了,现在,博客园的Clank解决了这个问题:

在MOSS2007中使用网页获取部件

 

几个“HOW TO”的开发资源链接:

http://www.u2u.info/Blogs/Patrick/Lists/Posts/ViewPost.aspx?ID=1730

MSDN的工作流动手实验包:

http://www.microsoft.com/downloads/details.aspx?familyid=2e575633-e357-4ee7-aaff-34138f00e830&displaylang=en

刚刚发布的如何修改“内容查询web部件”XSL样式的文章:

http://msdn2.microsoft.com/en-us/library/bb447557.aspx

posted on 2007-05-16 23:35:00 by choral  评论(5) 阅读(5718)

SharePoint SDK中关于定制列表模板的问题

信息来源:

Joris [MVP Windows SharePoint Services]
就是那个在自己blog上放了超级多资源链接的那个大牛……
 
据称,SharePoint SDK上介绍如何订制列表模板的文章缺少了一步(我自己还没机会试,估计咱们这儿需要这么深度改列表模板的兄弟也不多,留这篇文章做参考吧)
 
但缺少的那步可以这样弥补。转引如下:
(注,他应该会在最近写一篇博详细说这个问题,大家可以关注一下)
 

The SharePoint SDK shows How to - Create a Custom List Definition but is strange enough not complete. If you follow the SDK sample - the extra field you created in your custom list definition will NOT show up in the SharePoint form pages (Edit item, new item and view item).

In the next posting, I will describe in short the different steps - the last step is the one which I think is missing.

· Create a new feature as explained in the SharePoint SDK. Afterwards install and activate the feature.

· Modify the SCHEMA.XML file - Add your custom field inthe Fields section

<Fields>
<Field Type="Choice" Name="FavoriteColor" DisplayName= "Favorite Color"

ID="{5F11FE7B-C8D4-4849-A400-133352D17ECF}">

 <CHOICES>

  <CHOICE>Red</CHOICE>

  <CHOICE>Green</CHOICE>

  <CHOICE>Blue</CHOICE>

 </CHOICES>

</Field>

</Fields>

· Add a reference to the Field you defined within the ViewFields section

<ViewFields>
 <FieldRef Name="Attachments" ></FieldRef >
 <FieldRef Name="LinkTitle" ></FieldRef>
 < FieldRef Name="FavoriteColor"></ FieldRef>
</ViewFields>

· Modify the ContentTypes section and modify the Item contenttype to include the custom column. This change will make sure that the custom column will also show up in the edit and new forms.

<ContentTypes>

 <ContentTypeRef ID="0x0120" />

 <ContentType ID="0x0100EE310F92BD4F4ee79829A2FB3A01F1ED"

 Name="Item" Group="List Content Types" Description

 ="Create a new list item." Version="2" FeatureId=

 "{695b6570-a48b-4a8e-8ea5-26ea7fc1d162}">

  <FieldRefs>

   <FieldRef ID="{c042a256-787d-4a6f-8a8a-cf6ab767f12d}"

   Name="ContentType" />

   <FieldRef ID="{fa564e0f-0c70-4ab9-b863-0177e6ddd247}"

   Name="Title" Required="TRUE" ShowInNewForm=

   "TRUE" ShowInEditForm="TRUE" />

   <FieldRef ID="{5F11FE7B-C8D4-4849-A400-133352D17ECF}"

   Name="FavoriteColor"/>

  </FieldRefs>

  <XmlDocuments>

  <XmlDocument NamespaceURI="

       http://schemas.microsoft.com/sharepoint/v3/contenttype/forms">

   <FormTemplates xmlns="

          http://schemas.microsoft.com/sharepoint/v3/contenttype/forms">

    <Display>ListForm</Display>

    <Edit>ListForm</Edit>

    <New>ListForm</New>

   </FormTemplates>

  </XmlDocument>

 </XmlDocuments>

 <Folder TargetName="Item" />

</ContentType>

</ContentTypes>

· Finally create a new list using the new custom SharePoint list definition

 

posted on 2007-05-16 00:06:00 by choral  评论(4) 阅读(6075)

一个SharePoint事件处理程序实例

[Update:呵呵,把代码缩进改了改……]

[重要UPDATE:今天实际在生产环境中测试,发现调用SPWeb的时候,一定要site.OpenWeb(WebID)才可以虚拟管理员身份,也就是说,直接site.OpenWeb()或properties.OpenWeb()是不行的!

另外,一定要在虚拟身份之后重新获得网站对象模型,才能使用提升到系统账户的安全性上下文。]

监控一个列表,一旦有新条目生成,就将这个条目的权限继承关系断开,并把发布者设置为只读。这样,所有新建数据都只有提交人只读可见,但系统帐号可以监控所有的。

只是个非常简单的例子,但可以暴露出很多值得注意的东西。

稍后将争取与了不起的Erucy一起写一篇详细介绍SharePoint新权限系统的文章。

public class DemoHandler : SPItemEventReceiver //继承SharePoint数据条目事件监控类
{
    public override void ItemAdded(SPItemEventProperties properties)  //重载ItemAdded函数,监控新建列表条目事件
    {
        SPSecurity.RunWithElevatedPrivileges(delegate()      //用此方法模拟管理员账户运行此事件处理程序
        {
            using (SPSite site = new SPSite(properties.SiteId))    //用此方法的话就不用dispose()了
            {
                using (SPWeb web = site.OpenWeb(properties.OpenWeb().ID))  //注意获得web的方法!!!
                {
                    try
                    {
                        SPList list = web.Lists[properties.ListId];     //获得触发事件的列表
                        SPListItem item = list.Items.GetItemById(properties.ListItemId);    //获得触发事件的列表条目

                        if (!item.HasUniqueRoleAssignments) item.BreakRoleInheritance(false);   //将此条目取消权限继承,如果是“false”,则将去除所有权限,只保留系统账户,如果是“true”,则将上一级权限复制过来。
                        SPUser user = web.Users.GetByID(properties.CurrentUserId);    //获得触发此事件的用户

                        SPRoleAssignment ra = new SPRoleAssignment(web.EnsureUser(user.LoginName));   //生成一个新的角色分配
                        ra.RoleDefinitionBindings.Add(web.RoleDefinitions["读取"]);    //将此角色分配绑定“读取”权限级别
                        item.RoleAssignments.Add(ra);     //将此新权限绑定到列表条目上
                    }
                    catch (Exception ee)
                    {
                    }
                }

             }
        }
        );
    }
}

posted on 2007-05-14 20:36:00 by choral  评论(13) 阅读(8845)

在写SharePoint查询XML字符串的时候要注意的一个问题

偶然在SharePointBlogs组里面看到的。

来源:MdP's MOSS Blog

<And>和<Or>标签里面是不能同时套3个或更多比较标签的。

举例:

这么写是对的

<And>
 <Eq><FieldRef Name=”Title”><Value Type=”Text”>Value</Value></Eq>
 <Eq><FieldRef Name=”ContentType”><Value Type=”Text”>Product</Value></Eq>
</And>

<Or>
 <Eq><FieldRef Name=”Title”><Value Type=”Text”>Value</Value></Eq>
 <Eq><FieldRef Name=”ContentType”><Value Type=”Text”>Product</Value></Eq>
</Or>

但这么写是错的:

<And>
 <Eq><FieldRef Name=”Title”><Value Type=”Text”>Value</Value></Eq>
 <Eq><FieldRef Name=”ContentType”><Value Type=”Text”>Product</Value></Eq>
 <Eq><FieldRef Name=”Field1”><Value Type=”Text”>Value</Value></Eq>
</And>

<Or>
 <Eq><FieldRef Name=”Title”><Value Type=”Text”>Value</Value></Eq>
 <Eq><FieldRef Name=”ContentType”><Value Type=”Text”>Product</Value></Eq>
 <Eq><FieldRef Name=”Field1”><Value Type=”Text”>Value</Value></Eq>
</Or>

那如果需要同时And多个怎么办?

这样:

<And>
 <And>
  <Eq><FieldRef Name=”Title”><Value Type=”Text”>Value</Value></Eq>
  <Eq><FieldRef Name=”ContentType”><Value Type=”Text”>Product</Value></Eq>
 </And>
 <Eq><FieldRef Name=”Field1”><Value Type=”Text”>Value</Value></Eq>
</And>

<Or>
 <Or>
  <Eq><FieldRef Name=”Title”><Value Type=”Text”>Value</Value></Eq>
  <Eq><FieldRef Name=”ContentType”><Value Type=”Text”>Product</Value></Eq>
 </Or>
 <Eq><FieldRef Name=”Field1”><Value Type=”Text”>Value</Value></Eq>
</Or>

另外,Web部件管理器和事件处理程序管理器的英文版发布了:

http://www.colladec.com/en/default.aspx

posted on 2007-05-13 23:53:00 by choral  评论(4) 阅读(6705)

对SharePoint网站对象的Dispose

在使用SharePoint对象模型开发的时候,我们会经常使用SPSite对象和SPWeb对象,以及一些VirtualServer之类的对象。但可能被我们忽视的是(至少我是从来没考虑过)对这些对象的释放。

没错,每次使用过SPSite或SPWeb之后,一定要.Dispose(),这样才是真正顶呱呱的代码。

具体要怎样做呢?请看这篇MSDN文章:

SharePoint对象模型的Dispose最佳实践

posted on 2007-05-09 18:12:00 by choral  评论(5) 阅读(5125)

题外话:SharePoint之歌

来源:Bill English,就是写了那本厚厚的MOSS2007管理大全的家伙

这首歌好像是很多年前拿过格莱美奖的,但我记不得名字了,唱这歌的是一个巨搞的黑人……总之,用这个歌词一套,我刚刚已经哼唱着笑翻了。。

One, two, three-four-five, everyone in <name>, let’s get really wise

It’s time to ride that SharePoint Train so you don’t have to keep it all in your brain

Search, alerts, the team sites too, a SharePoint portal they will con-nect to

A single click here, a listing there, it’s way to good to be true

 

A little bit-a Windows in my life

A little bit-a SharePoint at my side

A little bit-a Search technology

A little bit-a IM is what I see

A little bit-a portals all night thru

A little bit-a team site is what I do

A little bit-a fun is guaranteed

A little bit-a high se-curi-ty

 

Work-spac-es will a-bound as you work from home or on this ground

Find your in-for-ma-tion fast, losing docs is a thing of the past

Send a message to you favorite friend or go in and lock that doc-u-ment

Creating a team site you can do, and you’ll have command of it too

 

A little bit-a Windows in my life

A little bit-a SharePoint at my side

A little bit-a Search technology

A little bit-a IM is what I see

A little bit-a portals all night thru

A little bit-a team site is what I do

A little bit-a fun is guaranteed

A little bit-a high se-curi-ty

posted on 2007-05-05 22:13:00 by choral  评论(10) 阅读(5281)

Powered by: Joycode.MVC引擎 0.5.2.0