<html> <head> <title>Service DataSourceBrowser</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="DataSourceBrowser-xref.html" class="navimain">Use</a></td> <td class="navimain"><a href="http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/OfficeDev/Component/Controllers#Document_Specific_Controller_Services" 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="#ServicesSummary" class="navisub">Services' Summary</a></td> <td class="navisub"><a href="#InterfacesSummary" class="navisub">Interfaces' Summary</a></td> <td class="navisub">Properties' Summary</td> <td class="navisub"><a href="#ServicesDetails" class="navisub">Services' Details</a></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">sdb</a> :: </p> </td> </tr> <tr> <td class="title">service DataSourceBrowser</td> </tr> <tr> <td><dl> <dt><b>Description</b></dt> <dd>implements a component which allows browsing the data sources registered on the system. </dd> <dd><p> This service implements a user interface for browsing data sources registered on the <a href="DatabaseContext.html">DatabaseContext</a> instance of the system. </p> <p> It is possible to navigate through all the data sources, it's queries and it's tables. The queries/tables can be displayed in a grid-like view, where functionality for searching, sorting, filtering, and such is provided. </p> <p> Usually, you won't instantiate this service directly, instead you use the dispatch mechanisms of the application framework to load the URL <b>.component:DB/DataSourceBrowser</b> into an arbitrary frame. This should involve a <a href="ContentLoader.html">ContentLoader</a> service, which creates and initializes the browser. </p> <p> Some aspects of the browser can be controlled from outside, eg., it is possible to dispatch a sort or filter request, if a table or query is being displayed. </p> <p >The communication between the browser and external instances works in two ways. <br/> The way <em>in</em> is provided by the ::com::sun::star::<a href="../frame/module-ix.html">frame</a>::<a href="../frame/XDispatchProvider.html">XDispatchProvider</a> interface the service exports (Please see below for more details on this). <br/> The way <em>out</em> works in another way. There are several URL's which an external instance can provide dispatches for (usually by implementing a ::com::sun::star::<a href="../frame/module-ix.html">frame</a>::<a href="../frame/XDispatchProviderInterceptor.html">XDispatchProviderInterceptor</a> for the parent frame of the browser), thus indicating that the browser should provide special functionality. <br/> In this case, the browser displays and maintains some additional slots (to be more concrete: toolbox items), which, upon triggering, call 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>methodoftheobject provided by the external instance. </p> <p> In particular, the supported URL's for communicating to an external instance are: <ul> <li><b>.uno:DataSourceBrowser/InsertColumns</b> <br/> Available whenever an external instance provides a dispatcher ( ::com::sun::star::<a href="../frame/module-ix.html">frame</a>::<a href="../frame/XDispatch.html">XDispatch</a>) for this URL. <br/> Enabled, if at least one row in the grid view of a table or query is selected. <br/> It is the task of the external instance to provide functionality for this URL, but usually it is used to implement some kind of "Data To Text" functionality. <br/> </li> <li><b>.uno:DataSourceBrowser/InsertContent</b> <br/> Available whenever an external instance provides a dispatcher( ::com::sun::star::<a href="../frame/module-ix.html">frame</a>::<a href="../frame/XDispatch.html">XDispatch</a> ) for this URL. <br/> Enabled, if at least one row in the grid view of a table or query is selected. <br/> It is the task of the external instance to provide functionality for this URL, but usually it is used to implement some kind of "Data To Fields" functionality. <br/> </li> <li><b>.uno:DataSourceBrowser/FormLetter</b> <br/> Available whenever an external instance provides a dispatcher ( ::com::sun::star::<a href="../frame/module-ix.html">frame</a>::<a href="../frame/XDispatch.html">XDispatch</a>)forthisURL. <br/> It is the task of the external instance to provide functionality for this URL, but usually it is used to implement some kind of "Form Letter" functionality. <br/> </li> </ul> </p> <p>For all kinds of URL's, the parameters supplied during dispatching build up a <a href="DataAccessDescriptor.html">DataAccessDescriptor</a>, where the following properties are present: <ul> <li><a href="DataAccessDescriptor.html">DataAccessDescriptor</a>::<a href="DataAccessDescriptor.html#DataSourceName">DataSourceName</a></li> <li><a href="DataAccessDescriptor.html">DataAccessDescriptor</a>::<a href="DataAccessDescriptor.html#Command">Command</a></li> <li><a href="DataAccessDescriptor.html">DataAccessDescriptor</a>::<a href="DataAccessDescriptor.html#CommandType">CommandType</a></li> <li><em>optional</em> <a href="DataAccessDescriptor.html">DataAccessDescriptor</a>::<a href="DataAccessDescriptor.html#Selection">Selection</a></li> <li><em>optional</em> <a href="DataAccessDescriptor.html">DataAccessDescriptor</a>::<a href="DataAccessDescriptor.html#BookmarkSelection">BookmarkSelection</a></li> <li><em>optional</em> <a href="DataAccessDescriptor.html">DataAccessDescriptor</a>::<a href="DataAccessDescriptor.html#ResultSet">ResultSet</a></li> </ul> </p> <p>The default for <a href="DataAccessDescriptor.html">DataAccessDescriptor</a>::<a href="DataAccessDescriptor.html#Selection">Selection</a> is to contain bookmarks, if not specified otherwise by <a href="DataAccessDescriptor.html">DataAccessDescriptor</a>::<a href="DataAccessDescriptor.html#BookmarkSelection">BookmarkSelection</a>.</pr> </p> </dd> <dt><b>See also</b></dt> <dd><a href="ContentLoader.html">ContentLoader</a>, <a href="DatabaseContext.html">DatabaseContext</a>, <a href="DataSource.html">DataSource</a>, ::com::sun::star::<a href="../frame/module-ix.html">frame</a>::<a href="../frame/XDispatch.html">XDispatch</a>, ::com::sun::star::<a href="../frame/module-ix.html">frame</a>::<a href="../frame/XDispatchProvider.html">XDispatchProvider</a>, ::com::sun::star::<a href="../frame/module-ix.html">frame</a>::<a href="../frame/XDispatchProviderInterceptor.html">XDispatchProviderInterceptor</a></dd> </dl> <a name="devmanual"> </a><dl> <dt><b>Developers Guide</b></dt> <dd><a href="http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/OfficeDev/Component/Controllers#Document_Specific_Controller_Services">OfficeDev - Component - Controllers - Document Specific Controller Services</a></dd> </dl> </td> </tr> </table> <hr> <a name="ServicesSummary"/><table border="1" width="100%" cellpadding="5" cellspacing="0" class="subtitle"> <tr> <td class="subtitle" colspan="2">Included Services - Summary</td> </tr> <tr> <td class="imsum_left">::com::sun::star::<a href="../form/module-ix.html">form</a>::<a href="../form/FormController.html">FormController</a></td> <td class="imsum_right"><p>implements basic form controller functionality. (<a href="#FormController">details</a>)</p> </td> </tr> </table> <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/XController.html">XController</a></td> <td class="imsum_right"><p>allows the component to be plugged into frames. </p> </td> </tr> <tr> <td class="imsum_left">::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/XInitialization.html">XInitialization</a></td> <td class="imsum_right"><p>is used to initialize the browser. (<a href="#XInitialization">details</a>)</p> </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>is used to control the browser from outside. (<a href="#XDispatchProvider">details</a>)</p> </td> </tr> <tr> <td class="imsum_left">::com::sun::star::<a href="../ui/module-ix.html">ui</a>::<a href="../ui/XContextMenuInterception.html">XContextMenuInterception</a></td> <td class="imsum_right"><p>allows to intercept user-triggered context menus in the data source browser (<a href="#XContextMenuInterception">details</a>)</p> </td> </tr> </table> <a name="ServicesDetails"/><table border="1" width="100%" cellpadding="5" cellspacing="0" class="subtitle"> <tr> <td class="subtitle" colspan="2">Included Services - Details</td> </tr> <tr/> <tr> <td class="imdetail"><a name="FormController" class="membertitle">::com::sun::star::<a href="../form/module-ix.html">form</a>::<a href="../form/FormController.html">FormController</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>implements basic form controller functionality. </dd> <dd><p> With a data source browser implementing this interface, external components have access to <ul><li>the grid control which is used to display the currently selected table/query (see <method scope="com.sun.star.form">XFormController::getControls()</method> ) </li> <li>the data form used for displaying objects. As always for components implementing this service, the object returned by <method scope="com.sun.star.awt">XTabController::getModel()</method>isadataform. </li> </ul> </p> </dd> </dl> </td> </tr> </table> </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="XController" class="membertitle">::com::sun::star::<a href="../frame/module-ix.html">frame</a>::<a href="../frame/XController.html">XController</a></a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-data" bgcolor="#ffffff" align="center"> <tr> <td><dl> <dt><b>Description</b></dt> <dd>allows the component to be plugged into frames. </dd> </dl> </td> </tr> </table> </td> </tr> <tr/> <tr> <td class="imdetail"><a name="XInitialization" class="membertitle">::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/XInitialization.html">XInitialization</a></a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-data" bgcolor="#ffffff" align="center"> <tr> <td><dl> <dt><b>Description</b></dt> <dd>is used to initialize the browser. </dd> <dd><p> Parameters (passed to the method ::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/XInitialization.html">XInitialization</a>::<a href="../lang/XInitialization.html#initialize">initialize()</a>) have to be instances of ::com::sun::star::<a href="../beans/module-ix.html">beans</a>::<a href="../beans/PropertyValue.html">PropertyValue</a>, or instances of ::com::sun::star::<a href="../beans/module-ix.html">beans</a>::<a href="../beans/NamedValue.html">NamedValue</a>, where the <code>Name</code> member specifies what the parameter controls, with the <code>Value</code> member containing the value to be used. <br/> Recognized parameters are: <ul> <li><b>Frame</b><br/> has to be an ::com::sun::star::<a href="../frame/module-ix.html">frame</a>::<a href="../frame/XFrame.html">XFrame</a> interface specifying the frame to plug the browser component into.</li> <li><b>DataSourceName</b><br/> The name of the globally registered <a href="DataSource.html">DataSource</a> to be used for initial display. It is only meaningful together with the other parameters specifying the object to display.</li> <li><b>CommandType</b><br/> This has to be a <a href="CommandType.html">CommandType</a> value, specifying the type of the object to display initially. It is only meaningful together with the <em>DataSourceName</em> and the <em>Command</em> parameters.</li> <li><b>Command</b><br/> This is a string giving the name of the object to display initially. Whether it is table name, a query name or a SQL string is controller by the <em>CommandType</em> parameter.</li> <li><b>EnableBrowser</b><br/> is a boolean value (defaulting to <b>true</b>), which specifies whether to enable the data source browser control. This is a tree control on the left hand side of the view, which allows to browse all registered data sources, including their tables and queries.</li> <li><b>ShowBrowser</b><br/> is a boolean value (defaulting to <b>true</b>), which specifies whether to initially show the data source browser control. If <code>EnableBrowser</code> is <b>false</b>, then this parameter is ignored. If <code>EnableBrowser</code> is <b>true</b>, and <code>ShowBrowser</code> is <b>false</b>, then the control is initially hidden, but can be toggled by a toolbar button.</p> <li><b>ShowMenu</b><br/> is a boolean value (defaulting to <b>true</b>), specifying whether or not to show a menu in the frame where the component is plugged.</li> </ul> </p> </dd> </dl> </td> </tr> </table> </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>Description</b></dt> <dd>is used to control the browser from outside. </dd> <dd><p> You may use the ::com::sun::star::<a href="../frame/module-ix.html">frame</a>::<a href="../frame/XDispatchProvider.html">XDispatchProvider</a>::<a href="../frame/XDispatchProvider.html#queryDispatch">queryDispatch</a> method to query for objects which implement the ::com::sun::star::<a href="../frame/module-ix.html">frame</a>::<a href="../frame/XDispatch.html">XDispatch</a> interface, and which allow you to be notified on status changes and to dispatch special requests. </p> <p> The recognized URLs are: <ul> <li><b>.uno:Copy</b> <br/> implements the usual <em>Copy</em> command. Enabled if the grid view has the focus and text in any cell is selected. </li> <li><b>.uno:Cut</b> <br/> implements the usual <em>Cut</em> command. Enabled if the grid view has the focus and text in any cell is selected. </li> <li><b>.uno:Paste</b> <br/> implements the usual <em>Paste</em> command. Enabled if the grid view has the focus and a cell which allows text input is being edited. </li> <li><b>.uno:EditDoc</b> <br/> allows switching the edit mode of the grid view. Enabled if editing the data is allowed in general. </li> <li><b>.uno:Undo</b> <br/> revokes any changes done in the current row. </li> <li><b>.uno:Save</b><br/> saves the changes done in the current row. </li> </ul> </p> </dd> </dl> </td> </tr> </table> </td> </tr> <tr/> <tr> <td class="imdetail"><a name="XContextMenuInterception" class="membertitle">::com::sun::star::<a href="../ui/module-ix.html">ui</a>::<a href="../ui/XContextMenuInterception.html">XContextMenuInterception</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 to intercept user-triggered context menus in the data source browser </dd> <dd><p>Context menu interception is currently supported only for the brower control where the registered data sources and all their tables and queries are displayed in a tree view.</p> <p>The selection supplied by ::com::sun::star::<a href="../ui/module-ix.html">ui</a>::<a href="../ui/ContextMenuExecuteEvent.html">ContextMenuExecuteEvent</a>::<a href="../ui/ContextMenuExecuteEvent.html#Selection">Selection</a>, in the event structure passed to the context menu interceptors, actually is a value from the ::com::sun::star::sdb::<a href="application/module-ix.html">application</a>::<a href="application/NamedDatabaseObject.html">NamedDatabaseObject</a> group.</p> </dd> <dt><b>Since </b></dt> <dd>OpenOffice 3.0</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>