Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > media > main-testing > by-pkgid > 2c50825dd66d0497b96a67f7fab2ee84 > files > 3009

openoffice.org64-devel-doc-2.4.1.10-1mdv2008.1.x86_64.rpm

<html>
<head>
<title>Service DataAwareControlModel</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../../../../idl.css">
</head>
<body>
<div id="adc-idlref">

<a name="_top_"> </a><table class="navimain" border="0" cellpadding="3">
<tr>
<td class="navimain"><a href="../module-ix.html" class="navimain">Overview</a></td>
<td class="navimain"><a href="module-ix.html" class="navimain">Module</a></td>
<td class="navimain"><a href="DataAwareControlModel-xref.html" class="navimain">Use</a></td>
<td class="navimain"><a href="http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Forms/Data_Aware_Controls" class="navimain">Devguide</a></td>
<td class="navimain"><a href="../../../../index-files/index-1.html" class="navimain">Index</a></td>
</tr>
</table>
<table class="navisub" border="0" cellpadding="0">
<tr>
<td class="navisub"><a href="#IncludedServices" class="navisub">Included Services</a></td>
<td class="navisub"><a href="#ExportedInterfaces" class="navisub">Exported Interfaces</a></td>
<td class="navisub"><a href="#PropertiesSummary" class="navisub">Properties' Summary</a></td>
<td class="navisub"><a href="#PropertiesDetails" class="navisub">Properties' Details</a></td>
</tr>
</table>
<hr>
<table border="0" width="100%" cellpadding="5" cellspacing="3" class="title-table" style="margin-bottom:6pt;">
<tr>
<td><p class="namechain"><a href="../../../../module-ix.html" class="namechain">::</a> <a href="../../../module-ix.html" class="namechain">com</a> :: <a href="../../module-ix.html" class="namechain">sun</a> :: <a href="../module-ix.html" class="namechain">star</a> :: <a href="module-ix.html" class="namechain">form</a> :: </p>
</td>
</tr>
<tr>
<td class="title">service DataAwareControlModel</td>
</tr>
<tr>
<td><dl>
<dt><b>Description</b></dt>
<dd>is an abstract service for specialized <a href="FormControlModel.html">FormControlModel</a>s
 which are data aware and thus can be bound to a data source.

 </dd>
<dd><p>The connection between a data-aware control model and a form which's data the
 control should display is made by parentship relations. The parent of a data-aware
 control model (see ::com::sun::star::<a href="../container/module-ix.html">container</a>::<a href="../container/XChild.html">XChild</a>, inherited
 via the <a href="FormControlModel.html">FormControlModel</a> and <a href="FormComponent.html">FormComponent</a> services) has
 always to be a ::com::sun::star::form::<a href="component/module-ix.html">component</a>::<a href="component/DataForm.html">DataForm</a>.</p>
 </dd>
</dl>
<a name="devmanual"> </a><dl>
<dt><b>Developers Guide</b></dt>
<dd><a href="http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Forms/Data_Aware_Controls">Forms - Data Aware Controls</a></dd>
</dl>
</td>
</tr>
</table>
<hr>
<a name="IncludedServices"/><table border="1" width="100%" cellpadding="5" cellspacing="0" class="subtitle">
<tr>
<td class="subtitle" colspan="2">Included Services</td>
</tr>
<tr>
<td class="imsum_left"><a href="FormControlModel.html">FormControlModel</a></td>
<td class="imsum_right"><dl>
<dt>(referenced entity's summary:)</dt>
<dd>specifies a control model within a form.

 </dd>
</dl>
</td>
</tr>
</table>
<a name="ExportedInterfaces"/><table border="1" width="100%" cellpadding="5" cellspacing="0" class="subtitle">
<tr>
<td class="subtitle" colspan="2">Exported Interfaces</td>
</tr>
<tr>
<td class="imsum_left"><a href="XBoundComponent.html">XBoundComponent</a></td>
<td class="imsum_right"><dl>
<dt><b>Usage Restrictions</b></dt>
<dd><i>optional</i></dd>
<dt><b>Description</b></dt>
<dd>makes it possible to transfer the data of the model to the connected data field.
 </dd>
<dd><p>
 This interface is optional, if a component doesn't support it, it has to forward
 the changes of it's value to the field it is connected to immediately (means whenever a user
 interaction changes it's content).
 </p>
 </dd>
</dl>
</td>
</tr>
<tr>
<td class="imsum_left"><a href="XLoadListener.html">XLoadListener</a></td>
<td class="imsum_right"><dl>
<dt><b>Description</b></dt>
<dd>must be implemented in order to recognize when the containing form of the model connects
 to its data source (loads its data). After loading the form, the model may bind to its
 related field source.<br/>
 This interface will seldom be used directly from outside.
 </dd>
</dl>
</td>
</tr>
<tr>
<td class="imsum_left"><a href="XReset.html">XReset</a></td>
<td class="imsum_right"><dl>
<dt><b>Description</b></dt>
<dd>Each <a href="DataAwareControlModel.html">DataAwareControlModel</a> should be resettable for setting default values. 

 </dd>
<dd><p>In the context of a control model which is data-aware, the semantics of <em>default value</em>
 (see <a href="XReset.html">XReset</a>) is as follows:<br/>
 If (and only if) the control is valid bound to a column of it's ::com::sun::star::form::<a href="component/module-ix.html">component</a>::<a href="component/DataForm.html">DataForm</a>, and the form
 is not positioned on a new record (see ::com::sun::star::<a href="../sdb/module-ix.html">sdb</a>::<a href="../sdb/RowSet.html">RowSet</a>::<a href="../sdb/RowSet.html#IsNew">IsNew</a>), then
 <a href="XReset.html">XReset</a>::<a href="XReset.html#reset">reset</a> does not reset the model's value to it's default value, but uses the
 underlying column value.<br/>
 In all other cases, the model is reset to the default value as specified by the respective property.</p>

 <p>For an example, have a look at the ::com::sun::star::form::<a href="component/module-ix.html">component</a>::<a href="component/TextField.html">TextField</a>. It inherites
 the ::com::sun::star::<a href="../awt/module-ix.html">awt</a>::<a href="../awt/UnoControlEditModel.html">UnoControlEditModel</a>::<a href="../awt/UnoControlEditModel.html#Text">Text</a> property from the underlying
 service, and additionally specifies the ::com::sun::star::form::<a href="component/module-ix.html">component</a>::<a href="component/TextField.html">TextField</a>::<a href="component/TextField.html#DefaultText">DefaultText</a>.
 </p>

 <p>In the context of a ::com::sun::star::form::<a href="component/module-ix.html">component</a>::<a href="component/DataForm.html">DataForm</a>, controls are
 automatically reset when one of the following applies
 <ul><li>The form is reset by invoking it's <a href="XReset.html">XReset</a> interface.</li>
 <li>The form moves to a new record.</li>
 <li>The changes in the current record of the form are undone</li>
 </ul>
 </p>
 </dd>
</dl>
</td>
</tr>
</table>
<a name="PropertiesSummary"/><table border="1" width="100%" cellpadding="5" cellspacing="0" class="subtitle">
<tr>
<td class="subtitle" colspan="2">Properties' Summary</td>
</tr>
<tr>
<td class="imsum_left">string<br>
<a href="#DataField">DataField</a></td>
<td class="imsum_right">specifies the name of the bound database field.

 &nbsp;</td>
</tr>
<tr>
<td class="imsum_left">[ readonly ] ::com::sun::star::<a href="../beans/module-ix.html">beans</a>::<a href="../beans/XPropertySet.html">XPropertySet</a><br>
<a href="#BoundField">BoundField</a></td>
<td class="imsum_right">references to the cursor field to which the control is bound.
 &nbsp;</td>
</tr>
<tr>
<td class="imsum_left">::com::sun::star::<a href="../beans/module-ix.html">beans</a>::<a href="../beans/XPropertySet.html">XPropertySet</a><br>
<a href="#LabelControl">LabelControl</a></td>
<td class="imsum_right">references to a control model within the same document which should be used as a label.
 &nbsp;</td>
</tr>
</table>
<a name="PropertiesDetails"/><table border="1" width="100%" cellpadding="5" cellspacing="0" class="subtitle">
<tr>
<td class="subtitle">Properties' Details</td>
</tr>
<tr>
<td class="imdetail"><a name="DataField" class="membertitle">DataField</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-data" bgcolor="#ffffff" align="center">
<tr>
<td>string <b>DataField</b>;<hr>
<dl>
<dt><b>Description</b></dt>
<dd>specifies the name of the bound database field.

 </dd>
<dd><p>This property makes sense in the <em>context</em> of the control model only. Normally, a control model
 is a child of a ::com::sun::star::form::<a href="component/module-ix.html">component</a>::<a href="component/DataForm.html">DataForm</a>, which is bound
 to a higher level object such as a table or query - more general, a result set.<br/>
 This member here describes the column of this result set which the control should act for.</p>

 <p>Not every control model can be bound to every database column. Usually, super services of the
 <a href="DataAwareControlModel.html">DataAwareControlModel</a> restrict the column types they can be used with.</p>

 </dd>
<dt><b>See also</b></dt>
<dd><a href="DataAwareControlModel.html">DataAwareControlModel</a>::<a href="DataAwareControlModel.html#BoundField">BoundField</a></dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="imdetail"><a name="BoundField" class="membertitle">BoundField</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-data" bgcolor="#ffffff" align="center">
<tr>
<td>[ readonly ] ::com::sun::star::<a href="../beans/module-ix.html">beans</a>::<a href="../beans/XPropertySet.html">XPropertySet</a> <b>BoundField</b>;<hr>
<dl>
<dt><b>Description</b></dt>
<dd>references to the cursor field to which the control is bound.
 </dd>
<dd><p>Applies only if the form the control model belongs to is loaded and the control is valid bound.
 The referenced field supports the ::com::sun::star::<a href="../sdb/module-ix.html">sdb</a>::<a href="../sdb/Column.html">Column</a> service.
 </p>
 </dd>
<dt><b>See also</b></dt>
<dd><a href="DataAwareControlModel.html">DataAwareControlModel</a>::<a href="DataAwareControlModel.html#DataField">DataField</a></dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="imdetail"><a name="LabelControl" class="membertitle">LabelControl</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-data" bgcolor="#ffffff" align="center">
<tr>
<td>::com::sun::star::<a href="../beans/module-ix.html">beans</a>::<a href="../beans/XPropertySet.html">XPropertySet</a> <b>LabelControl</b>;<hr>
<dl>
<dt><b>Description</b></dt>
<dd>references to a control model within the same document which should be used as a label.
 </dd>
<dd><p>Any user interface action which needs to refer to the control is assumed to use this
 property. <br/>
 A very common design method for forms is to group a data aware control with a label control,
 with the latter describing the content of the former. For instance, you may have a
 ::com::sun::star::form::<a href="component/module-ix.html">component</a>::<a href="component/TextField.html">TextField</a>, which is bound to the e-mail
 column of your data source. Then you will probably add a
 ::com::sun::star::form::<a href="component/module-ix.html">component</a>::<a href="component/FixedText.html">FixedText</a> which's label is "E-Mail",
 and associate it with the TextField by setting it as <a href="#LabelControl">LabelControl</a>.<br/>
 Now if you imagine a component offering data search in a form, this component will examine
 the <a href="#LabelControl">LabelControl</a> property, find the ::com::sun::star::form::<a href="component/module-ix.html">component</a>::<a href="component/FixedText.html">FixedText</a>,
 examine it's label, and use this label to refer to the ::com::sun::star::form::<a href="component/module-ix.html">component</a>::<a href="component/TextField.html">TextField</a>.
 </p>
 <p>When setting the property, a number of constraints apply:
 <ul>
 <li>The object which is to be set has to support the following interfaces
 <ul><li>::com::sun::star::<a href="../awt/module-ix.html">awt</a>::<a href="../awt/XControlModel.html">XControlModel</a></li>
 <li>::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/XServiceInfo.html">XServiceInfo</a></li>
 <li>::com::sun::star::<a href="../beans/module-ix.html">beans</a>::<a href="../beans/XPropertySet.html">XPropertySet</a></li>
 <li>::com::sun::star::<a href="../container/module-ix.html">container</a>::<a href="../container/XChild.html">XChild</a></li>
 </ul>
 </il>
 <li>It has to be a part of the same document as the model who's property is to be modified.</il>
 <li>Additionally, the support of a special service, indicating that the model is of the right type,
 is required. Which kind of service is in the request depends on the type of the control model.<br/>

 For instance, text fields (::com::sun::star::form::<a href="component/module-ix.html">component</a>::<a href="component/TextField.html">TextField</a>) can be
 labelled by label controls only (::com::sun::star::form::<a href="component/module-ix.html">component</a>::<a href="component/FixedText.html">FixedText</a>),
 and radio buttons (::com::sun::star::form::<a href="component/module-ix.html">component</a>::<a href="component/RadioButton.html">RadioButton</a>) can be labelled
 by group boxes (::com::sun::star::form::<a href="component/module-ix.html">component</a>::<a href="component/GroupBox.html">GroupBox</a>) only.
 </li>
 </ul>
 </p>
 </dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br>&nbsp;<a href="#_top_">Top of Page</a><hr size="3"><p class="copyright" align="center">Copyright &copy; 2008 Sun Microsystems, Inc.</p>

</div> <!-- id="adc-idlref" -->
</body>

</html>