Partager via


SPMobileListFieldSelector Class

Specifies the name of the <RenderingTemplate> element to be used when rendering a field on a mobile form.

Inheritance Hierarchy

System.Object
  System.Web.UI.Control
    System.Web.UI.MobileControls.MobileControl
      Microsoft.SharePoint.MobileControls.SPMobileComponent
        Microsoft.SharePoint.MobileControls.SPMobileTemplateSelector
          Microsoft.SharePoint.MobileControls.SPMobileListTemplateSelector
            Microsoft.SharePoint.MobileControls.SPMobileListFieldSelector

Namespace:  Microsoft.SharePoint.MobileControls
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

<AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level := AspNetHostingPermissionLevel.Minimal)> _
<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel := True)> _
<AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level := AspNetHostingPermissionLevel.Minimal)> _
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel := True)> _
Public NotInheritable Class SPMobileListFieldSelector _
    Inherits SPMobileListTemplateSelector

Dim instance As SPMobileListFieldSelector
[AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel = true)]
[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel = true)]
public sealed class SPMobileListFieldSelector : SPMobileListTemplateSelector

Remarks

For an overview of the role of this class in the page rendering system for mobile devices, see Mobile Page Rendering System.

SPMobileListFieldSelector specifies a name of the following form.

MobileCustomListField_ListTemplateType_FieldType_FieldInternalName

The ListTemplateType is either the integer value of the Type attribute for the Collaborative Application Markup Language (CAML) <ListTemplate Element (List Template)> element or the value of the Name attribute. For example, the Type value for the contacts list template is 105 and its Name value is Contacts, so you can use either "105" or "Contacts" for ListTemplateType.

The FieldType is either a String representation of one of the values of the SPFieldType enumeration or a String representation of the integer equivalent of one of those values. It can also be the ID of a custom field type.

The FieldInternalName is the value of the Name property of the Collaborative Application Markup Language (CAML) <Field Element (Field)> element in the list's schema.xml file (located in the list type's subfolder of C:\\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\FEATURES) for the field types that ship with Windows SharePoint Services 3.0. For custom field types, it is defined in the fldtypes*.xml file for the custom field type.

The following are examples of possible RenderingTemplate names that SPMobileListFieldSelector a might specify.

MobileCustomListField_105_Text_WorkPhone
MobileCustomListField_Contacts_Text_HomePhone
MobileCustomListField_PictureLibrary_Computed_ImageSize
MobileCustomListField_Posts_DateTime_PublishedDate

If the runtime cannot find a <RenderingTemplate> element with the specified name, it uses the MobileDefaultListField <RenderingTemplate>. The latter calls a SPMobileListField control that renders the field as either a simple label or a UI element, depending on the page type and field type. For example, there is no <RenderingTemplate> with the following name.

MobileCustomListField_Announcements_DateTime_Expires

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

SPMobileListFieldSelector Members

Microsoft.SharePoint.MobileControls Namespace