<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="#IncludedServices" class="navisub">Included Services</a></td> <td class="navisub"><a href="#ExportedInterfaces" class="navisub">Exported Interfaces</a></td> <td class="navisub">Properties' Summary</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 <service scope="com::sun::star::sdb"> DatabaseContext </service> 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 <service scope="com::sun::star::sdb"> ContentLoader </service> 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 specifies 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="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">::com::sun::star::<a href="../form/module-ix.html">form</a>::<a href="../form/FormController.html">FormController</a></td> <td class="imsum_right"><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> <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">::com::sun::star::<a href="../frame/module-ix.html">frame</a>::<a href="../frame/XController.html">XController</a></td> <td class="imsum_right"><dl> <dt><b>Description</b></dt> <dd>allows the component to be plugged into frames. </dd> </dl> </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"><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> , where the ::com::sun::star::<a href="../beans/module-ix.html">beans</a>::<a href="../beans/PropertyValue.html">PropertyValue</a>::<a href="../beans/PropertyValue.html#Name">Name</a> member specifies what the parameter controls, with the ::com::sun::star::<a href="../beans/module-ix.html">beans</a>::<a href="../beans/PropertyValue.html">PropertyValue</a>::<a href="../beans/PropertyValue.html#Value">Value</a> 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 <service> DataSource </service> 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> </ul> </p> </dd> </dl> </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"><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> <br> <a href="#_top_">Top of Page</a><hr size="3"><p class="copyright" align="center">Copyright © 2008 Sun Microsystems, Inc.</p> </div> <!-- id="adc-idlref" --> </body> </html>