Wss3sdk: ellipsis and rendering restrictions in mobile development

Source: Internet
Author: User
Tags configuration settings
In the mobile device viewer, if the text length of a field exceeds web. config ( Local_drive: \ Program Files \ common files \ microsoft shared \ Web Server Extensions \ 12 \ template \ layouts \ mobile Directory), WSS will display the ellipsis. The mobile list item editing form contains a large amount of data. WSS disables the field editing function based on the field type to avoid data loss due to content exceeding the specified limit. In either case, the limitations of mobile rendering determine what content will be displayed on the mobile device.
Figure 1. Text cutting and ellipsis Rendering

You can modify the length limit of the text to change its rendering effect in the mobile view or form. There are two ways to choose from: one is to edit the Web. config file in a text editor, and the other is to modify it by using the type and members in the WSS object model.
Rendering restrictions not only define the text length limit for animation rendering for the mobile control, but also include many other display options for the control. For a detailed list of rendering restrictions and their default values, see the table at the end of this article.
Each display setting is represented by a name-value pair in the <ettings> section of the web. config file. For example, <add key = "mobile_webtitlelimit" value = "20"/>. If the text length limit is set to 0 or not specified, the ellipsis rendering is invalid.
Note: :
To modify these attribute values, you must modify the mobile Web. confg file on all front-end web servers deployed in WSS to make the change take effect.

Configure limits using object models

Rendering restrictions are determined by one of the two methods. One is the default configuration settings in the mobile Web. config file, and the other is to configure web attributes for each website through the object model. Your modifications to Web. config are global Based on the front-end web server layer. However, changes to Web attributes are at the website level and are not inherited from sub-websites.
To allow customization of website-level rendering restrictions, WSS first determines whether rendering restriction parameters are stored in Web attributes. If yes, use the rendering restriction stored by the web property value; otherwise, use the rendering restriction of Web. config. The Web attribute settings of a specific website overwrite the global settings in Web. config.
To modify the rendering restrictions of a mobile control, you can useMicrosoft. Sharepoint. spwebClassPropertiesProperty returns an attribute package (Microsoft. Sharepoint. Utilities. sppropertybag) Object, including all configurations of a given website. The following example shows how to change the rendering limit of the List title of a specified website to 15 characters.
C #

Spweb website = Spcontext. Current. Site. allwebs [ " Website " ];
Sppropertybag propbag = Website. properties;
Propbag [ " Mobile_listtitlelimit " ] =   " 15 " ;
Propbag. Update ();

The above example needs to be referencedMicrosoft. SharePointAndMicrosoft. Sharepoint. UtilitiesNamespace. In additionProgramInsertFormdigestControl.

Rendering restrictions

 

The following table describes the rendering restriction parameters for mobile pages and Their default maximum values.

Name Description Value

Basic rendering restrictions

 

 

Mobile_basetextlengthlimit

Limits on text Length

255

System rendering restrictions

 

 

Mobile_enablelimitationondispform

Specifies the function for rendering ellipsis in a display form.

False

Mobile_fieldnumberlimitforinputform

Maximum number of fields displayed in the new/edit form

100

Mobile_fieldtitlelimit

Field title restrictions (displayed in the form)

20

Mobile_itemtitlelimit

Restrictions on the title of a list item (displayed in the form)

20

Mobile_listtitlelimit

Restrictions on the list title (displayed in the List View)

20

Mobile_viewitemnumberlimit

Maximum number of items displayed in the List View

100

Mobile_viewnumberlimit

View quantity limit in view selector (displayed in List View)

10

Mobile_viewtitlelimit

View title restriction in the view selector (displayed in the List View)

20

Mobile_webtitlelimit

 

20

Field restrictions

 

 

Mobile_attachmentsfieldnumberlimit

Maximum number of attachments displayed

3

Mobile_attachmentsfieldtextlimit

Length limit of a single attachment file name

20

Mobile_calculatedfieldtextlimit

Length limit of calculated value fields

20

Mobile_choicefieldoptionnumberlimit

Number of items displayed by option fields in the new or edit form

10

Mobile_choicefieldoptiontextlimit

Title length limit of an option in the option field

20

Mobile_fieldtextlimitforview

Length limit of a field value in the view

19

Mobile_filefieldtextlimit

The length of the file field is limited.

20

Mobile_lookupfieldoptionnumberlimit

Maximum number of items displayed by a query item field in the new or edit form

10

Mobile_lookupfieldoptiontextlimit

Length limit of an option in the item Field

20

Mobile_multichoice_displaylimitforselectedchoices

 

10

Mobile_multilinetextfieldtextlimit

Length limit of Multi-Line Text Field Values

256

Mobile_multilookup_displaylimitforselectedlookups

 

10

Mobile_multiuser_displaylimitforselectedusers

 

100

Mobile_singlelinetextfieldtextlimit

Length limit of Single-Line Text Field Values

256

Mobile_urlfieldtextlimit

URL field value length limit

20

Mobile_userfieldoptionnumberlimit

Limit on the number of items displayed for user-type fields in the new or edit form

100

Mobile_userfieldoptiontextlimit

The title length limit of an option in the user Field

20

Note::
The unit of character limit in the preceding table is the number of characters, which is the same for both halfwidth and fullwidth characters.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.