<html> <head> <title>Service FormControllerDispatcher</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="FormControllerDispatcher-xref.html" class="navimain">Use</a></td> <td class="navimainnone">Devguide</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">Services' Summary</td> <td class="navisub"><a href="#InterfacesSummary" class="navisub">Interfaces' Summary</a></td> <td class="navisub">Properties' Summary</td> <td class="navisub">Services' Details</td> <td class="navisub"><a href="#InterfacesDetails" class="navisub">Interfaces' Details</a></td> <td class="navisub">Properties' Details</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 FormControllerDispatcher</td> </tr> <tr> <td><dl> <dt><b>Description</b></dt> <dd>specifies a component which can be used to dispatch form controller functionality. </dd> <dd><p>A form controller dispatcher is an instance which provides access to dispatchers (::com::sun::star::<a href="../frame/module-ix.html">frame</a>::<a href="../frame/XDispatch.html">XDispatch</a>) for certain form controller functionality.</p> <p>The way how access to these dispatchers is provided is not defined. It may either be directly via an ::com::sun::star::<a href="../frame/module-ix.html">frame</a>::<a href="../frame/XDispatchProvider.html">XDispatchProvider</a> interface, or indirectly, e.g. by registering dispatch interceptors (::com::sun::star::<a href="../frame/module-ix.html">frame</a>::<a href="../frame/XDispatchProviderInterceptor.html">XDispatchProviderInterceptor</a>) at another instance which supports this (by exposing the ::com::sun::star::<a href="../frame/module-ix.html">frame</a>::<a href="../frame/XDispatchProviderInterception.html">XDispatchProviderInterception</a> interface).</p> <p>In any scenario, foreign components have a (implicit or explicit) possibility to request a dispatcher for a given URL.</p> <p>Below, there's a list of URLs which have a defined meaning - if a <a href="FormControllerDispatcher.html">FormControllerDispatcher</a> implementation supports one of them, there must be a guaranteed semantices. However, concrete implementations may support an arbitrary sub or super set of these URLs.</p> <p>In general, all URLs start with the same prefix, namely <em>.uno:FormController/</em>. To this, a suffix is appended which describes the requested functionality.<br/> Example: The URL suffix for deleting the current record is <em>deleteRecord</em>, so the complete URL for requesting a dispatcher for this functionality is <em>.uno:FormController/deleteRecord</em>.</p> <p>Some URLs may require parameters. For this, the sequence of ::com::sun::star::<a href="../beans/module-ix.html">beans</a>::<a href="../beans/PropertyValue.html">PropertyValue</a>s passed to the ::com::sun::star::<a href="../frame/module-ix.html">frame</a>::<a href="../frame/XDispatch.html">XDispatch</a>::<a href="../frame/XDispatch.html#dispatch">dispatch</a> call is used - every property value is used as one named parameter.</p> <p>For all URLs, interested parties can register as status listeners (::com::sun::star::<a href="../frame/module-ix.html">frame</a>::<a href="../frame/XStatusListener.html">XStatusListener</a>) at the dispatchers, and be notified whenever the functionality associated with the URL becomes enabled or disabled.<br/> For instance, the URL with the suffix <em>moveToFirst</em> is associated with moving the form to the first record, and it will be disabled in case the form is already positioned on the first record.</p> <p>Nearly all of the functionality offered by a <a href="FormControllerDispatcher.html">FormControllerDispatcher</a> can also be reached by other means. E.g., moving a form to its first record can be achieved by calling the method ::com::sun::star::<a href="../sdbc/module-ix.html">sdbc</a>::<a href="../sdbc/XResultSet.html">XResultSet</a>::<a href="../sdbc/XResultSet.html#first">first</a> of the form.<br/> However, the advantage of using a <a href="FormControllerDispatcher.html">FormControllerDispatcher</a> is that it's usually implemented by a component which has additional knowledge about the form. For instance, in a document which displays a form, there might be a control which contains uncommitted changes, plus a control whose changes were already committed to the current record, but <em>not</em> to the database. Simply calling ::com::sun::star::<a href="../sdbc/module-ix.html">sdbc</a>::<a href="../sdbc/XResultSet.html">XResultSet</a>::<a href="../sdbc/XResultSet.html#first">first</a> on the form would lose both the content in the uncommitted control, and the changes in the current record.<br/> An <a href="FormControllerDispatcher.html">FormControllerDispatcher</a> is expected to care for both of these.</p> <table style="width:100%;" border="0" cellpadding="2" cellspacing="2"><tbody> <tr style="vertical-align: top;"> <td><b>URL suffix</b></td> <td><b>functionality</b></td> </tr> <tr style="vertical-align: top;"> <td><em>positionForm</em></td> <td>positions the form on a record given by absolute number.<br/> There's one parameter for this functionality, named <em>Position</em>, which must be a long value specifying the absolute position to which the form should be moved</td> </tr> <tr style="vertical-align: top;"> <td><em>RecordCount</em></td> <td>This is a passive functionality: It cannot be dispatched, instead, interested parties may use the dispatcher to add as ::com::sun::star::<a href="../frame/module-ix.html">frame</a>::<a href="../frame/XStatusListener.html">XStatusListener</a>, and be notified when the record count changes.<br/> The status value which is being notified (::com::sun::star::<a href="../frame/module-ix.html">frame</a>::<a href="../frame/FeatureStateEvent.html">FeatureStateEvent</a>::<a href="../frame/FeatureStateEvent.html#State">State</a>) is a string which can be used to display the record count. In particular, if the record count is not yet known (::com::sun::star::<a href="../sdb/module-ix.html">sdb</a>::<a href="../sdb/RowSet.html">RowSet</a>::<a href="../sdb/RowSet.html#IsRowCountFinal">IsRowCountFinal</a> is <b>false</b>), this is indicated in the string, too.</td> </tr> <tr style="vertical-align: top;"> <td><em>moveToFirst</em></td> <td>moves the form to the first record</td> </tr> <tr style="vertical-align: top;"> <td><em>moveToPrev</em></td> <td>moves the form to the record preceding the current one</td> </tr> <tr style="vertical-align: top;"> <td><em>moveToNext</em></td> <td>moves the form to the record after the current one</td> </tr> <tr style="vertical-align: top;"> <td><em>moveToLast</em></td> <td>moves the form to the last record</td> </tr> <tr style="vertical-align: top;"> <td><em>moveToNew</em></td> <td>moves the form to the virtual "insert row", where new records can be inserted</td> </tr> <tr style="vertical-align: top;"> <td><em>saveRecord</em></td> <td>Commits any potentially pending changes in the current control, and saves the current record to the database, or inserts a new record if the form is currently positioned on the virtual insertion row.</td> </tr> <tr style="vertical-align: top;"> <td><em>undoRecord</em></td> <td>reverts the changes done to the current record. Basically, this means refreshing the current row from the database, and updating all controls with the new content.</td> </tr> <tr style="vertical-align: top;"> <td><em>deleteRecord</em></td> <td>deletes the current record, after asking the user for confirmation.</td> </tr> <tr style="vertical-align: top;"> <td><em>refreshForm</em></td> <td>reloads the complete form. After this, the form is positioned on the first record</td> </tr> <tr style="vertical-align: top;"> <td><em>sortUp</em></td> <td>Adds an order clause to the form, to sort it ascending by the field which the current control is bound to, and then reloads the form.</td> </tr> <tr style="vertical-align: top;"> <td><em>sortDown</em></td> <td>Adds an order clause to the form, to sort it descending by the field which the current control is bound to, and then reloads the form.</td> </tr> <tr style="vertical-align: top;"> <td><em>sort</em></td> <td>opens an dialog, which allows the user to manipulate the current sorting order of the form. If the dialog is closed with OK, the form is reloaded after setting the new sorting order.</td> </tr> <tr style="vertical-align: top;"> <td><em>autoFilter</em></td> <td>creates, from the current control, a filter for the form. This is, if the current control is bound to the field, say, "customer", and contains the value "Furs, Inc.", then a filter "customer = 'Furs, Inc.'" is created and set at the form. After this, the form is reloaded.</td> </tr> <tr style="vertical-align: top;"> <td><em>filter</em></td> <td>opens an dialog, which allows the user to manipulate the current filter of the form. If the dialog is closed with OK, the form is reloaded after setting the new filter.</td> </tr> <tr style="vertical-align: top;"> <td><em>applyFilter</em></td> <td><p>Toggles the ::com::sun::star::<a href="../sdb/module-ix.html">sdb</a>::<a href="../sdb/RowSet.html">RowSet</a>::<a href="../sdb/RowSet.html#ApplyFilter">ApplyFilter</a> property of the form.</p> <p>Additionally, status listeners will be provided with the current (boolean) state of this property in the ::com::sun::star::<a href="../frame/module-ix.html">frame</a>::<a href="../frame/FeatureStateEvent.html">FeatureStateEvent</a>::<a href="../frame/FeatureStateEvent.html#State">State</a> member of the event notified by the dispatcher.</p></td> </tr> <tr style="vertical-align: top;"> <td><em>removeFilterOrder</em></td> <td>completely removes any filter and sorting order from the form, and reloads it.</td> </tr> </tbody></table> </dd> <dt><b>See also</b></dt> <dd><a href="FormController.html">FormController</a></dd> </dl> </td> </tr> </table> <hr> <a name="InterfacesSummary"/><table border="1" width="100%" cellpadding="5" cellspacing="0" class="subtitle"> <tr> <td class="subtitle" colspan="2">Exported Interfaces - Summary</td> </tr> <tr> <td class="imsum_left">::com::sun::star::<a href="../frame/module-ix.html">frame</a>::<a href="../frame/XDispatchProvider.html">XDispatchProvider</a></td> <td class="imsum_right"><p>allows direct access to the dispatchers provided by the component. (<a href="#XDispatchProvider">details</a>)</p> </td> </tr> </table> <a name="InterfacesDetails"/><table border="1" width="100%" cellpadding="5" cellspacing="0" class="subtitle"> <tr> <td class="subtitle" colspan="2">Exported Interfaces - Details</td> </tr> <tr/> <tr> <td class="imdetail"><a name="XDispatchProvider" class="membertitle">::com::sun::star::<a href="../frame/module-ix.html">frame</a>::<a href="../frame/XDispatchProvider.html">XDispatchProvider</a></a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-data" bgcolor="#ffffff" align="center"> <tr> <td><dl> <dt><b>Usage Restrictions</b></dt> <dd><i>optional</i></dd> <dt><b>Description</b></dt> <dd>allows direct access to the dispatchers provided by the component. </dd> </dl> </td> </tr> </table> </td> </tr> </table> <br> <a href="#_top_">Top of Page</a><hr size="3"><p class="copyright" align="center">Copyright © 2011, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.</p> </div> <!-- id="adc-idlref" --> </body> </html>