org.symbian.tools.wrttools.doc.WebDeveloper/html/GUID-94FAF08A-F3E3-4686-A35B-E98EEBF18824.html
changeset 229 716254ccbcc0
equal deleted inserted replaced
228:913c9751c067 229:716254ccbcc0
       
     1 
       
     2 <!DOCTYPE html
       
     3   PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
       
     4 <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><meta name="copyright" content="(C) Copyright 2009"/><meta name="DC.rights.owner" content="(C) Copyright 2009"/><meta name="DC.Type" content="mobileconcept"/><meta name="DC.Title" content="Criteria for adding and editing contact information"/><meta name="DC.Relation" scheme="URI" content="GUID-7C69DDA4-16F1-4A8F-BDB2-4CB0015B4E81"/><meta name="DC.Relation" scheme="URI" content="GUID-65AAF569-D347-462B-B59A-9D7CA184AB9C"/><meta name="DC.Relation" scheme="URI" content="GUID-A5853293-7B83-4CCE-9C29-B2B8F0CD8A18"/><meta name="DC.Relation" scheme="URI" content="GUID-20D66938-A870-43D7-9515-AC7E22AEDC14"/><meta name="DC.Format" content="XHTML"/><meta name="DC.Identifier" content="GUID-94FAF08A-F3E3-4686-A35B-E98EEBF18824"/><title>Criteria for
       
     5 adding and editing contact information </title><script type="text/javascript">
       
     6       function initPage() {}
       
     7     </script><link href="../PRODUCT_PLUGIN/book.css" rel="stylesheet" type="text/css"/><link href="css/s60/style.css" rel="stylesheet" type="text/css" media="all"/></head><body onload="initPage();"><div class="body"><div class="contentLeft prTxt"><h1 class="pageHeading" id="GUID-94FAF08A-F3E3-4686-A35B-E98EEBF18824"><span>Criteria</span> for
       
     8 adding and editing contact information</h1><div>
       
     9 <p>The  <code>criteria</code> object specifies what contact
       
    10 information to add or edit and for which database. The information can be
       
    11 either a contact or a contact group. For a contact, the actual contact details
       
    12 are contained in one or more <a href="GUID-686FDCE2-4487-4402-8347-875350D30163.html#GUID-686FDCE2-4487-4402-8347-875350D30163">keys</a>,
       
    13 with each key representing a specific piece of information. If no database
       
    14 is specified, the information is added to the default database. If the default
       
    15 database does not exist, it is created.</p>
       
    16 <p>Use the <a href="GUID-20D66938-A870-43D7-9515-AC7E22AEDC14.html#GUID-20D66938-A870-43D7-9515-AC7E22AEDC14"><code>Add</code></a> method
       
    17 as follows:</p>
       
    18 <ul>
       
    19 <li><p>To add a new contact or contact group, do not set its <code>id</code> property.</p>
       
    20 </li>
       
    21 <li><p>To edit an existing contact or contact group, retrieve it
       
    22 using <a href="GUID-37C9E5F0-BEA9-4E0B-A40D-B953B3551007.html#GUID-37C9E5F0-BEA9-4E0B-A40D-B953B3551007"><code>GetList</code></a>,
       
    23 edit the information, and then send it to <code>Add</code> with the <code>id</code> property
       
    24 unchanged. This overwrites the old entry.</p></li>
       
    25 </ul>
       
    26 <p>The  <code>criteria</code> object has two main properties: <code>Type</code> and <code>Data</code>.
       
    27 These are described in the following table. Properties enclosed in brackets
       
    28 are optional.</p>
       
    29 <div class="note"><p><strong class="note_title">Note: </strong>All string values in the object are Unicode.</p>
       
    30 </div>
       
    31 <div class="tablenoborder"><a name="GUID-C05DA5A7-A2B6-419C-A81A-0D6191987480"><!----></a><table cellpadding="4" cellspacing="0" summary="" id="GUID-C05DA5A7-A2B6-419C-A81A-0D6191987480" frame="border" border="1" rules="all"><caption><strong>Table: </strong><span>Criteria</span> object properties</caption>
       
    32 
       
    33 <thead align="left">
       
    34 <tr class="title "><th class="cellrowborder" valign="top" width="25%" id="d0e32113">
       
    35 <p>Property</p>
       
    36 </th><th class="cellrowborder" valign="top" width="25%" id="d0e32118">
       
    37 <p>Description</p>
       
    38 </th><th class="cellrowborder" valign="top" width="25%" id="d0e32123">
       
    39 <p>Type</p>
       
    40 </th><th class="cellrowborder" valign="top" width="25%" id="d0e32128">
       
    41 <p>Value</p>
       
    42 </th></tr>
       
    43 </thead>
       
    44 <tbody>
       
    45 <tr class="">
       
    46 <td class="cellrowborder" valign="top" width="25%" headers="d0e32113 ">
       
    47 <p><code>criteria.Type</code></p>
       
    48 </td>
       
    49 <td class="cellrowborder" valign="top" width="25%" headers="d0e32118 ">
       
    50 <p>Specifies the type of contact information to add or edit.</p>
       
    51 </td>
       
    52 <td class="cellrowborder" valign="top" width="25%" headers="d0e32123 ">
       
    53 <p>string</p>
       
    54 </td>
       
    55 <td class="cellrowborder" valign="top" width="25%" headers="d0e32128 ">
       
    56 <p>Possible values:</p>
       
    57 <ul>
       
    58 <li><p><code>"Contact"</code></p></li>
       
    59 <li><p><code>"Group"</code></p></li>
       
    60 </ul>
       
    61 </td>
       
    62 </tr>
       
    63 <tr class="bg ">
       
    64 <td class="cellrowborder" valign="top" width="25%" headers="d0e32113 ">
       
    65 <p><code>criteria.Data</code></p>
       
    66 </td>
       
    67 <td class="cellrowborder" valign="top" width="25%" headers="d0e32118 ">
       
    68 <p>Specifies the contact information to add or edit.</p>
       
    69 <p>If <code>Type</code> is <code>"Contact"</code>, this
       
    70 property takes one or more <code>&lt;key&gt;</code> properties. The number
       
    71 of keys depends on how much information is added about the contact.</p>
       
    72 </td>
       
    73 <td class="cellrowborder" valign="top" width="25%" headers="d0e32123 ">
       
    74 <p>object</p>
       
    75 </td>
       
    76 <td class="cellrowborder" valign="top" width="25%" headers="d0e32128 ">
       
    77 <p>Object with the properties specified below</p>
       
    78 </td>
       
    79 </tr>
       
    80 <tr class="">
       
    81 <td class="cellrowborder" valign="top" width="25%" headers="d0e32113 ">
       
    82 <p><code>[criteria.Data.DBUri]</code></p>
       
    83 </td>
       
    84 <td class="cellrowborder" valign="top" width="25%" headers="d0e32118 ">
       
    85 <p>Specifies the contacts database where the information is added or edited.</p>
       
    86 <p>If this property is not specified, the default database is used.</p>
       
    87 </td>
       
    88 <td class="cellrowborder" valign="top" width="25%" headers="d0e32123 ">
       
    89 <p>string</p>
       
    90 </td>
       
    91 <td class="cellrowborder" valign="top" width="25%" headers="d0e32128 ">&nbsp;</td>
       
    92 </tr>
       
    93 <tr class="bg ">
       
    94 <td class="cellrowborder" valign="top" width="25%" headers="d0e32113 ">
       
    95 <p><code>[criteria.Data.id]</code></p>
       
    96 </td>
       
    97 <td class="cellrowborder" valign="top" width="25%" headers="d0e32118 ">
       
    98 <p>Specifies the unique identifier of the contact or contact group to add
       
    99 or edit.</p>
       
   100 <div class="note"><p><strong class="note_title">Note: </strong></p><ul>
       
   101 <li><p>If you want to add a new entry to the database, do not specify
       
   102 this property.</p></li>
       
   103 <li><p>If you want to edit (replace) an existing entry in the database,
       
   104 specify the ID of that entry.</p></li>
       
   105 </ul>
       
   106 </div>
       
   107 </td>
       
   108 <td class="cellrowborder" valign="top" width="25%" headers="d0e32123 ">
       
   109 <p>string</p>
       
   110 </td>
       
   111 <td class="cellrowborder" valign="top" width="25%" headers="d0e32128 ">&nbsp;</td>
       
   112 </tr>
       
   113 <tr class="">
       
   114 <td class="cellrowborder" valign="top" width="25%" headers="d0e32113 ">
       
   115 <p><code>criteria.Data.&lt;key&gt;</code></p>
       
   116 </td>
       
   117 <td class="cellrowborder" valign="top" width="25%" headers="d0e32118 ">
       
   118 <p>Each key represents one piece of information about the contact, such
       
   119 as first name, last name, home phone number, or email address. At least one
       
   120 key must be specified for the contact.</p>
       
   121 <p>For example:</p>
       
   122 <ul>
       
   123 <li><p><code>Data.FirstName</code></p></li>
       
   124 <li><p><code>Data.LastName</code></p></li>
       
   125 <li><p><code>Data.LandPhoneHome</code></p></li>
       
   126 <li><p><code>Data.EmailHome</code></p></li>
       
   127 </ul>
       
   128 <p>For a list of supported keys, see section <a href="GUID-686FDCE2-4487-4402-8347-875350D30163.html#GUID-686FDCE2-4487-4402-8347-875350D30163">Supported contact keys</a>.</p>
       
   129 <div class="note"><p><strong class="note_title">Note: </strong>This property is valid only if <code>Type</code> is <code>"Contact"</code>.</p>
       
   130 </div>
       
   131 </td>
       
   132 <td class="cellrowborder" valign="top" width="25%" headers="d0e32123 ">
       
   133 <p>object</p>
       
   134 </td>
       
   135 <td class="cellrowborder" valign="top" width="25%" headers="d0e32128 ">
       
   136 <p>Object with the properties specified below</p>
       
   137 </td>
       
   138 </tr>
       
   139 <tr class="bg ">
       
   140 <td class="cellrowborder" valign="top" width="25%" headers="d0e32113 ">
       
   141 <p><code>criteria.Data.&lt;key&gt;.Label</code></p>
       
   142 </td>
       
   143 <td class="cellrowborder" valign="top" width="25%" headers="d0e32118 ">
       
   144 <p>Specifies a label that describes the key value.</p>
       
   145 </td>
       
   146 <td class="cellrowborder" valign="top" width="25%" headers="d0e32123 ">
       
   147 <p>string</p>
       
   148 </td>
       
   149 <td class="cellrowborder" valign="top" width="25%" headers="d0e32128 ">&nbsp;</td>
       
   150 </tr>
       
   151 <tr class="">
       
   152 <td class="cellrowborder" valign="top" width="25%" headers="d0e32113 ">
       
   153 <p><code>criteria.Data.&lt;key&gt;.Value</code></p>
       
   154 </td>
       
   155 <td class="cellrowborder" valign="top" width="25%" headers="d0e32118 ">
       
   156 <p>Specifies the value for the key.</p>
       
   157 <p>If this is an empty string, the property is not included.</p>
       
   158 </td>
       
   159 <td class="cellrowborder" valign="top" width="25%" headers="d0e32123 ">
       
   160 <p>string</p>
       
   161 </td>
       
   162 <td class="cellrowborder" valign="top" width="25%" headers="d0e32128 ">&nbsp;</td>
       
   163 </tr>
       
   164 <tr class="bg ">
       
   165 <td class="cellrowborder" valign="top" width="25%" headers="d0e32113 ">
       
   166 <p><code>[criteria.Data.&lt;key&gt;.Next]</code></p>
       
   167 </td>
       
   168 <td class="cellrowborder" valign="top" width="25%" headers="d0e32118 ">
       
   169 <p>This is an object that specifies an additional value for the key. This
       
   170 object contains the same properties as a key: <code>Label</code>, <code>Value</code>,
       
   171 and optionally <code>Next</code>, where <code>Next</code> is
       
   172 an object identical to this one, specifying yet another value for the same
       
   173 key.</p>
       
   174 <p>There is no limit to how many nested values a key can contain.</p>
       
   175 <p>For example, an <code>EmailHome</code> key with two values (two
       
   176 email addresses) has the following property structure:</p>
       
   177 <ul>
       
   178 <li><p><code>Data.EmailHome</code></p></li>
       
   179 <li><p><code>Data.EmailHome.Label</code></p></li>
       
   180 <li><p><code>Data.EmailHome.Value</code></p></li>
       
   181 <li><p><code>Data.EmailHome.Next</code></p></li>
       
   182 <li><p><code>Data.EmailHome.Next.Label</code></p></li>
       
   183 <li><p><code>Data.EmailHome.Next.Value</code></p></li>
       
   184 </ul>
       
   185 <p>The first email address is contained in <code>Data.EmailHome.Value</code> and
       
   186 the second one in <code>Data.EmailHome.Next.Value</code>.</p>
       
   187 </td>
       
   188 <td class="cellrowborder" valign="top" width="25%" headers="d0e32123 ">
       
   189 <p>object</p>
       
   190 </td>
       
   191 <td class="cellrowborder" valign="top" width="25%" headers="d0e32128 ">
       
   192 <p>Object with the same properties as <code>Data.&lt;key&gt;</code></p>
       
   193 </td>
       
   194 </tr>
       
   195 <tr class="">
       
   196 <td class="cellrowborder" valign="top" width="25%" headers="d0e32113 ">
       
   197 <p><code>criteria.Data.GroupLabel</code></p>
       
   198 </td>
       
   199 <td class="cellrowborder" valign="top" width="25%" headers="d0e32118 ">
       
   200 <p>Specifies the name of the contact group.</p>
       
   201 <p>If the database does not support group labels, this property is ignored.
       
   202 SIM databases, for example, do not support group labels.</p>
       
   203 <div class="note"><p><strong class="note_title">Note: </strong>This property is valid only if <code>Type</code> is <code>"Group"</code>.</p>
       
   204 </div>
       
   205 </td>
       
   206 <td class="cellrowborder" valign="top" width="25%" headers="d0e32123 ">
       
   207 <p>string</p>
       
   208 </td>
       
   209 <td class="cellrowborder" valign="top" width="25%" headers="d0e32128 ">&nbsp;</td>
       
   210 </tr>
       
   211 </tbody>
       
   212 </table></div></div></div></div><div class="footer"><hr/><div class="copy">© Nokia 2009.</div></div></body></html>