sharepoint 自定列表总结
2013-10-24 15:54
204 查看
Elements.xml
<ListTemplate Name="SPMeetingRoomBookingList" Type="106" BaseType="0" Category="Tracking" OnQuickLaunch="TRUE" FolderCreation="FALSE" SecurityBits="11" Sequence="340" DisplayName="$Resources:SPMeetingRoomBooking,spmrb_el_devicebookingtemplate" Description="$Resources:SPMeetingRoomBooking,spmrb_el_devicebookingtemplate" Image="/_layouts/images/itevent.png"/> </Elements>
Name :用于指定List Definition的内部名称
Type : 是个 Integer类型值。提供这个List Template的唯一标识符。
BaseType :是个Integer值。用于为此List Template指定基本类型或默认架构,可以的值如下:
0 -- GenericList
1 -- DocumentLibrary
3 -- DiscussionBoard
4 — Survey
5 -- Issue
Category:指定列表所属的类别
OnQuickLaunch:在网站的“快速启动”栏中显示根据本List Template定义创建的List实例,一旦部署这个Solution,就可以在网站的QuickLaunch栏找到这个List实例。
SecurityBits:第一个数字控制读取权限;第二个数字控制编辑权限。
对于读取权限,有效的数字如下:
1 用户可读取所有项。
2 用户只能读取自己的项。
对于编辑权限,有效的数字如下:
1 用户可编辑所有项。
2 用户只能编辑自己的项。
4 用户不能编辑项。
Sequence : Integer值。指定排序优先级。
DisplayName:指定列表定义的显示名称。
Description:提供列表定义的说明
Image:指定指向用于表示列表的图标的 URL。
Schema.xml
<?xml version="1.0" encoding="utf-8"?> <List xmlns:ows="Microsoft SharePoint" Title="$Resources:SPMeetingRoomBooking,spmrb_el_bookingtemplate" Direction="$Resources:Direction;" Url="Lists/SPMeetingRoomBookingList" EnableContentTypes="TRUE" MultipleTypes="TRUE" BaseType="0" xmlns="http://schemas.microsoft.com/sharepoint/"> <MetaData> <ContentTypes></ContentTypes> <Fields></Fields> <Views></Views> <Forms> </Forms> <DefaultDescription>$Resources:camlidE14;</DefaultDescription> </MetaData> </List>
ContentTypes
直接引用<ContentTypes> <ContentTypeRef ID="0x01020072BB2A38F0DB49C3A96CF4FA8552995600B061BF2223438E45961A747BF356CAC3" /> </ContentTypes>
添加
<ContentTypes> <ContentType> <FieldsRefs> <FieldRef id="">; <RemoveFieldRef id=""/> <FieldsRefs> </ContentType> </ContentTypes>
Fields
<Field ID="{8137f7ad-9170-4c1d-a17b-4ca7f557bc88}" Name="ParticipantsPicker" DisplayName="$Resources:SPMeetingRoomBooking,spmrb_lblparticipantsPicker" Type="UserMulti" List="UserInfo" Mult="TRUE" Required="TRUE" ShowField="ImnName" UserSelectionMode="PeopleAndGroups" UserSelectionScope="0" Sortable="FALSE" Sealed="FALSE" AllowDeletion="FALSE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="ParticipantsPicker" ColName="int5" />
ID需要我们指定,我们可以使用GUID工具来获取
Name就是我们给这个Site Column所指定的名字
Type 是这个Site Column所使用的字段类型,如下类型:
• Single line of text • Multiple lines of text • Choice (menu to choose from) • Number (1, 1.0, 100) • Currency ($, ¥, ) • Date and Time • Lookup (looks up values from a list already on the site) • Yes/No (check box) • Person or Group • Hyperlink or Picture • Calculated (calculation based on other columns
Group属性是指我们把这个用户新增的Site Column放入到哪一个Site Column Group中.
DisplayName则是我们在Sharepoint UI上可以看到到此Site Column显示出来的名字。
这个节点包含 Schema.xml 文件中的列表定义或全局 Onet.xml 文件中的基本列表类型的字段定义,以指定在列表中实现的字段。
Default设置默认值
<Field ID="{9276C6E8-482B-44F2-806D-058305002A8F}" Name="shiping" DisplayName="$Resources:SPMeetingRoomBooking,MeetingShiping" Type="Choice" Format="Dropdown" FillInChoice="FALSE" SourceID="http://schemas.microsoft.com/sharepoint/v3" StaticName="Category" ColName="nvarchar16"> <Default>是</Default> <CHOICES> <CHOICE>是</CHOICE> <CHOICE>否</CHOICE> </CHOICES> </Field>
views
定义List的视图Forms
用于定义基列表类型中的表单集合。相关文章推荐
- [总结]SHAREPOINT - CAML列表查询(上)
- postgresql 常用知识点总结列表
- 编程珠玑: 12章 取样问题 12.1程序的输入包含两个整数m和n,其中m<n。输出是0~n-1范围内m个随机整数的有序列表,不允许重复-------解题总结
- 安卓开发ListView列表点击显示错乱bug自我总结
- Android 控件之 Spinner下拉列表 使用简单总结
- python之列表使用方法总结
- 使用SPCAMLEditor为Sharepoint列表增加鼠标移入提示字段
- Python对list列表结构中的值进行去重的方法总结
- python修改列表问题总结
- Sharepoint2010应用开发四:使用客户对象模型(Client Object Model)向SharePoint列表写数据
- 使用client对象模型读取SharePoint列表数据
- sharepoint 2013 文档库 资源管理器打开报错 在文件资源管理器中打开此位置时遇到问题,将此网站添加到受信任站点列表,然后重试。
- Python数据结构:序列(列表[]、元组())与映射(字典{})语法总结
- SharePoint 2013 中开发可以被标记为未读和已读的列表之代码实现篇
- 在定义SharePoint列表的SPD数据视图的时候需要注意的问题
- Python 列表总结
- [Python学习]总结一下Cygwin安装与进阶学习列表
- SharePoint 2013 图文开发系列之代码定义列表
- 【八】列表、字典、集合、元组间的数据类型转换总结
- Perl列表和数组用法的总结