惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Cyberwarzone
Cyberwarzone
Vercel News
Vercel News
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
aimingoo的专栏
aimingoo的专栏
B
Blog RSS Feed
A
About on SuperTechFans
T
The Blog of Author Tim Ferriss
爱范儿
爱范儿
腾讯CDC
S
SegmentFault 最新的问题
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
The Hacker News
The Hacker News
J
Java Code Geeks
大猫的无限游戏
大猫的无限游戏
B
Blog
IT之家
IT之家
Spread Privacy
Spread Privacy
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
C
Cisco Blogs
Recent Announcements
Recent Announcements
H
Hacker News: Front Page
AI
AI
I
InfoQ
H
Heimdal Security Blog
T
Threatpost
Cisco Talos Blog
Cisco Talos Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
I
Intezer
W
WeLiveSecurity
SecWiki News
SecWiki News
MongoDB | Blog
MongoDB | Blog
宝玉的分享
宝玉的分享
博客园 - 【当耐特】
云风的 BLOG
云风的 BLOG
T
Threat Research - Cisco Blogs
V2EX - 技术
V2EX - 技术
N
News and Events Feed by Topic
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
O
OpenAI News
阮一峰的网络日志
阮一峰的网络日志
T
Troy Hunt's Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
博客园 - 司徒正美
Apple Machine Learning Research
Apple Machine Learning Research
雷峰网
雷峰网
T
Tor Project blog
有赞技术团队
有赞技术团队
Schneier on Security
Schneier on Security
Last Week in AI
Last Week in AI

博客园 - ◎寶☆呗

Sharepoint 自定义字段(栏) 动态获取数据 Sharepoint 工具使用总结 Sharepoint 内存泄漏 检测工具+-- Extjs 中的tbar中的事件 winform Tab键循序 小发现 instsrv.exe——来自Windows 2000 Resource Kits的一个小工具 [转载]MOSS 2007 SP1 stsadm 194 条指令 (用命令行部署infopath Form )Deploy administrator-approved form templates using command line sharepoint计时器(定时发邮件) Infopath开发经验(xml数据) 基本活动:CodeActivity 通过Sharepoint扩展的Webserives来获取某一权限是是否存在 Create a New SharePoint Permission Level and Bind it to an Existing SharePoint Group 执行带返回参数的存储过程 Sorry.....Sorry..... 操作Infopath中的XMl C#编程规范<二> C#代码规范. 工作需要养成的习惯(个人经验)
Creating a Custom SharePoint 2007 List Definition
◎寶☆呗 · 2008-01-24 · via 博客园 - ◎寶☆呗

Creating a custom site column for the submission comments

1. Create a folder named SubmissionColumns in the C:"Program Files"Common Files"Microsoft Shared"web server extensions"12"TEMPLATE"FEATURES (FEATURES) directory.

2. Create an xml file named feature.xml inside this folder that contains the following information:

<?xmlversion="1.0"encoding="utf-8" ?>
<Feature
    Id="{a94f84a5-c87a-4fef-8e01-f064bc1bd9d7}" 
   
Title="Submission Columns"

 Description="This feature contains site columns used in the submission process"

 Version="12.0.0.0"

 Scope="Site"
 xmlns="http://schemas.microsoft.com/sharepoint/">

 <ElementManifests>

     <ElementManifestLocation="submissioncolumn.xml" />

 </ElementManifests>

</Feature>

3. Create a xml file named submissioncolumn.xml that contains the following information:

<Elementsxmlns="http://schemas.microsoft.com/sharepoint/">

    <FieldID="{374e02cc-fe2e-4247-8762-e69242f9ff94}"

        Name="SubmissionComments"
       
SourceID="http://schemas.microsoft.com/sharepoint/v3"

        StaticName="SubmissionComments"

        Group="Submission Columns"

        Type="Note"

        DisplayName="Comments"

        Sortable="FALSE"

        Description="Comments on the submission"

        Sealed="TRUE"

        UnlimitedLengthInDocumentLibrary="TRUE"

        AllowDeletion="TRUE"

        ShowInFileDlg="FALSE">

    </Field>

</Elements>

Here we are defining the system name (Name and StaticName) the base type (Type) and several other attributes of our site column. The FEATURES"fields folder contains examples of default site columns, and is useful in understanding how all these attributes are used.

4. Activate the feature using the following commands (in a command window, from the C:"Program Files"Common Files"Microsoft Shared"web server extensions"12"BIN directory):

stsadm -o installfeature -filename SubmissionColumns"feature.xml -force
stsadm -o activatefeature -filename SubmissionColumns"feature.xml -url http://localhost

Creating a custom submission list definition

1. Create a folder named SubmissionsList in the FEATURES directory.

2. Create a xml file named feature.xml that contains the following information:

<?xmlversion="1.0"encoding="utf-8" ?>
<Feature 
   
Id="{6d2c42db-782c-417e-9c7c-2c941ef52b92}"
   Title="Submission List"
   Description="This feature contains a submission list definition"
   Version="12.0.0.0"
   Scope="Site"
    xmlns="http://schemas.microsoft.com/sharepoint/">
    <ElementManifests>
        <ElementManifest Location="ListTemplate"Submissions.xml" />
    </ElementManifests>
</Feature>

3. Create a folder named ListTemplate inside the SubmissionsList folder and add an xml file named Submissions.xml that contains the following information:

<?xmlversion="1.0"encoding="utf-8"?>

<Elementsxmlns="http://schemas.microsoft.com/sharepoint/">

    <ListTemplate

          Name="Submissions"

          Type="6500"

          BaseType="0"

          OnQuickLaunch="TRUE"

          SecurityBits="11"

          Sequence="360"

          DisplayName="Submissions"

          Description="Create a submissions list when you want to allow users to submit submissions on a document"
   
      Image="/_layouts/images/itgen.gif" />

</Elements>

Here we are defining a unique type number for our list (which can be used if we want to include this list in a custom site definition), the sequence it should appear in the ‘create’ page and other basic attributes. Note the displayname used must match the folder that contains the list schema defined in the next step.

4. Create a folder named Submissions inside the SubmissionsList folder and copy the FEATURES"CustomList"CustList"Schema.xml file into the Submissions folder.

5. Update the ContentTypes element in the Schema.xml file to the following:

<ContentTypes>
   
<ContentTypeRefID="0x01AB">
        <FolderTargetName="Submission" />
    </ContentTypeRef>
    <ContentTypeRefID="0x0120" />
</ContentTypes>

Here we define our custom ‘submission’ content type as the base type for this list. The columns defined in this content type are then shown on the ‘add new item’ page.

6. Update the Fields element in the Schema.xml file to the following:

<Fields>

    <Field

        Name="Title"

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

        DisplayName="Title"

        Sealed="TRUE"

        SourceID="http://schemas.microsoft.com/sharepoint/v3"

        StaticName="Title">                      

    </Field>

    <Field

        ID="{475c2610-c157-4b91-9e2d-6855031b3538}"

        Name="FullName"

        DisplayName="$Resources:core,Full_Name;"

        Type="Text"

        SourceID="http://schemas.microsoft.com/sharepoint/v3"

        StaticName="FullName">                   

    </Field>

    <Field

        ID="{fce16b4c-fe53-4793-aaab-b4892e736d15}"

        Name="Email"

        DisplayName="$Resources:core,E-mail_Address;"

        Type="Text"

        SourceID="http://schemas.microsoft.com/sharepoint/v3"

        StaticName="Email">                      

    </Field>

    <FieldID="{374e02cc-fe2e-4247-8762-e69242f9ff94}"

        Name="SubmissionComments"

        SourceID="http://schemas.microsoft.com/sharepoint/v3"

        StaticName="SubmissionComments"

        Group="Submission Columns"

        Type="Note"

        DisplayName="Comments"

        Sortable="FALSE"

        Description="Comments on the submission"

        Sealed="TRUE"

        UnlimitedLengthInDocumentLibrary="TRUE"

        AllowDeletion="TRUE"

        ShowInFileDlg="FALSE">

    </Field>

</Fields>

Here we define the custom fields from our content type that we want to use in our list.

7. Lastly update the ViewFields element to contain the columns we want to display on our default list view:

<ViewFields>

    <FieldRefName="Attachments">

    </FieldRef>

    <FieldRefName="LinkTitle">

    </FieldRef>

    <FieldRefName="FullName">

    </FieldRef>

    <FieldRefName="Email">

    </FieldRef>

    <FieldRefName="SubmissionComments">

    </FieldRef>

</ViewFields>

8. Activate the feature using the following commands:

stsadm -o installfeature -filename SubmissionList"feature.xml -force
stsadm -o activatefeature -filename SubmissionList"feature.xml -url http://localhost
iisreset