您的位置:首页 > Web前端

Sharepoint2007自定义Feature(4)--CustomAction各个属性表示的意思总结

2008-11-05 21:48 295 查看
<CustomAction


  ContentTypeId = "Text"


  ControlAssembly = "Text"


  ControlClass = "Text"


  ControlSrc = "Text"


  Description = "Text"


  GroupId = "Text"


  Id = "Text"


  ImageUrl = "Text"


  Location = "Text"


  RegistrationId = "Text"


  RegistrationType = "Text"


  RequireSiteAdministrator = "TRUE" | "FALSE"


  Rights = "Text"


  Sequence = "Integer"


  ShowInLists = "TRUE" | "FALSE"


  ShowInReadOnlyContentTypes = "TRUE" | "FALSE"


  ShowInSealedContentTypes = "TRUE" | "FALSE"


  Title = "Text">


</CustomAction>

1.ContentTypeId:Optional Text. Specifies the ID of a content type to
associate with the custom action.表示和custom action相关的一个content type id.
2.ControlAssembly:

Optional Text. Specifies the assembly of a control that
supports the custom action.
支持custom action的一个控件的程序集。
3.ControlClass:
Optional Text. Specifies a control class that supports the
custom action.支持custom action 的一个控件类。
4.ControlSrc:Optional Text.控件的地址
5.Description:Optional Text. Specifies a longer description for the action
that is exposed as a tooltip or sub-description for the action(关于这个自定义的action的一些描述)。
6.GroupId:

Optional Text. Identifies an action group that contains the
action, for example,
"SiteManagement"
. If contained within a custom
action group, the value of the GroupId attribute must equal the
group ID of the CustomActionGroup
element.(标识这个custom action属于那个组)。
7.Id:

Optional Text. Specifies a unique identifier for the custom
action. The ID may be a GUID, or it may be a unique term, for example,
"HtmlViewer"
.(表示这个custom action的唯一的一个标识)。
8.ImageUrl:

Optional Text. Specifies a virtual server relative link to
an image that presents an icon for the item.(表示这个自定义的action的图标的url)。
9.Location:

Optional Text. Specifies the location of this custom action,
for example,
"Microsoft.SharePoint.SiteSettings"
. If the custom
action is a menu item or toolbar button, then the possible options include
EditControlBlock, NewFormToolbar,
DisplayFormToolbar, and EditFormToolbar.

If contained within a custom action group, the value of the
Location attribute must equal the location of the CustomActionGroup
element.(该custom action处于sharepoint的哪个位置)。
10.RegistrationId:

Optional Text. Specifies the identifier of the list or item
content type that this action is associated with, or the file type or
programmatic identifier (ProgID).(该id可以指定将这个custom action 部署到那个位置,或是那个区域)。
11.RegistrationType:Optional Text. Specifies the registration attachment for a
per-item action. Possible values include:ContentType,List,FileType,ProgId四种。
表示该自定义action属于哪个类型。
12.RequiredSiteAdministrator:

Optional Boolean. TRUE to specify that the
item be displayed only if the user is a site administrator; otherwise,
FALSE.(如果该用户是管理员则能够显示这个自定义feature)。
13.Rights:

Optional Text. Specifies a set of rights that the user must
have in order for the link to be visible, for example,
"ViewListItems,AddListItems,DeleteListItems"
. If not specified, then the action
always appears in the list of actions. To specify multiple rights, separate the
values by using commas. The set of rights are grouped logically according to
AND logic, which means that a user must have all the specified
rights to see an action. For a list of possible values, see Microsoft.SharePoint.SPBasePermissions.(使用这个属性可以对具有不同权限的用户使用这个自定义的action进行控制)。
14.Sequence:

Optional Integer. Specifies the ordering priority for
actions.(表示这个custom action的优先级顺序)。
15.ShowReadOnlyContentTypes:
Optional Boolean. TRUE if the custom action
is only displayed for read-only content types on the page for managing content
types. The default value is FALSE.(是否只显示只读的content type,默认是false).
16.ShowSealedContentTypes:

Optional Boolean. TRUE if the custom action
is only displayed for sealed content types on the page for managing content
types. The default value is FALSE.(是否只显示隐藏的content type,默认是false)。
17.Title:

Required Text. Specifies the end user description for this
action.(显示给user的一个描述关于这个自定义feature)。

看下面的例子:
<?xml version="1.0" encoding="utf-8" ?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
  <CustomAction Id="TestCustomAction"
    RegistrationType="List"
    RegistrationId="101"
    GroupId="UploadMenu"
    Location="Microsoft.SharePoint.StandardMenu"
    Sequence="1000"
    Title="TestCustomAction"
    Rights="AddListItems,DeleteListItems,ViewListItems,CreateVersions"       
    Description="Test custom action"
    ImageUrl="/_layouts/images/test.GIF">
    <UrlAction Url="javascript:window.location='{SiteUrl}/_layouts/test.aspx?'"/>
  </CustomAction>
</Elements>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息