MyMobileWeb PhoneBookAdder Tag
From Morfeo Wiki
Contents |
Overview
The Phonebookadder control allows the user to add phone numbers directly to device's phone book from the browser, provided the device has that capability. If the control contains text, it will be shown as a link in the page. If not, the phone number will be shown.
Attributes
The attributes supported by this tag are the following:
- Attribute: id (required)
Identifier for this control. - Attribute: style
Reference to the CSS2 style for this component, or a E.L. which solves this reference. - Attribute: display
E.L. which contains the condition to show the control or not.
Default value: true. - Attribute: number (required)
Represents the telephone number. It must not have any spaces or other characters between the digits and it is recommended to precede it always with the country number. For example a correct spanish phone number would be +34913458745. An E.L. which resolves the phone number is also allowed. - Attribute: name (required)
The name attribute indicates the name that will be used for this contact in the phone book. It can also be a E.L.
CSS styles
img-display style:
This control has a resourceid associated: _MYMW_IMG_PHONEBOOKADDER. With this style you can stay if the image should be shown at the left of the control. The allowed values are:
- both: Show the image and also the phone number.
- none: Only the phone number will be shown.
Default value is both.
If needed, the image resource provided by MyMobileWeb can be changed.
It inherits all styles from label control.
Example
This example is a MyMobileWeb presentation which contains the Phonebookader control to allow the user to add new contacts. Note that both the value of number attribute and name are Expression Languages, so we use binding to associate context and control data. No style properties are explicity set so it will take default values, for example the image resource will be shown. For those devices that don't support the capability of adding new contacts to the phone book, the name and phone number will appear in blue color.
- Another phonebookadder example is available in Basic Examples [1]





