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

'Declaration
<AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level := AspNetHostingPermissionLevel.Minimal)> _
<AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level := AspNetHostingPermissionLevel.Minimal)> _
Public NotInheritable Class SPMobileListFieldSelector _
    Inherits SPMobileListTemplateSelector
'Usage
Dim instance As SPMobileListFieldSelector
[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
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 %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\FEATURES) for the field types that ship with SharePoint Foundation. 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