<html> <head> <title>Interface XComponentLoader</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="XComponentLoader-xref.html" class="navimain">Use</a></td> <td class="navimain"><a href="#devmanual" 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="#MethodsSummary" class="navisub">Methods' Summary</a></td> <td class="navisub">Attributes' Summary</td> <td class="navisub"><a href="#MethodsDetails" class="navisub">Methods' Details</a></td> <td class="navisub">Attributes' 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">frame</a> :: </p> </td> </tr> <tr> <td class="title">interface XComponentLoader</td> </tr> <tr> <td/></tr> <tr> <td><dl> <dt><b>Description</b></dt> <dd>this is a simple interface to load components by an URL into a frame environment </dd> <dt><b>See also</b></dt> <dd><a href="Desktop.html">Desktop</a>, <a href="Frame.html">Frame</a>, <a href="XFrame.html">XFrame</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/Text/Handling_Text_Document_Files#Creating_and_Loading_Text_Documents">Text - Handling Text Document Files - Creating and Loading Text Documents</a></dd> <dd><a href="http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/OfficeDev/Integrating_Import_and_Export_Filters">OfficeDev - Integrating Import and Export Filters</a></dd> <dd><a href="http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/OfficeDev/Handling_Documents#Loading_Documents">OfficeDev - Handling Documents - Loading Documents</a></dd> <dd><a href="http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/OfficeDev/Using_the_Desktop">OfficeDev - Using the Desktop</a></dd> <dd><a href="http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/Spreadsheets/Handling_Spreadsheet_Documents_Files#Creating_and_Loading_Spreadsheet_Documents">Spreadsheets - Handling Spreadsheet Documents Files - Creating and Loading Spreadsheet Documents</a></dd> </dl> </td> </tr> </table> <hr> <a name="MethodsSummary"/><table border="1" width="100%" cellpadding="5" cellspacing="0" class="subtitle"> <tr> <td class="subtitle" colspan="2">Methods' Summary</td> </tr> <tr> <td class="imsum_left"><a href="#loadComponentFromURL">loadComponentFromURL</a></td> <td class="imsum_right">loads a component specified by an URL into the specified new or existing frame. </td> </tr> </table> <a name="MethodsDetails"/><table border="1" width="100%" cellpadding="5" cellspacing="0" class="subtitle"> <tr> <td class="subtitle">Methods' Details</td> </tr> <tr> <td class="imdetail"><a name="loadComponentFromURL" class="membertitle">loadComponentFromURL</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center"> <tr> <td><table class="table-in-method" border="0"> <tr> <td valign="top" colspan="3">::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/XComponent.html">XComponent</a></td> </tr> <tr> <td valign="top"><b>loadComponentFromURL</b>(</td> <td valign="top">[in] string</td> <td valign="bottom"> URL,</td> </tr> <tr> <td/><td valign="top">[in] string</td> <td valign="bottom"> TargetFrameName,</td> </tr> <tr> <td/><td valign="top">[in] long</td> <td valign="bottom"> SearchFlags,</td> </tr> <tr> <td/><td valign="top">[in] sequence< ::com::sun::star::<a href="../beans/module-ix.html">beans</a>::<a href="../beans/PropertyValue.html">PropertyValue</a> ></td> <td valign="bottom"> Arguments )</td> </tr> <tr> <td valign="top" align="right">raises( </td> <td valign="top" colspan="2">::com::sun::star::<a href="../io/module-ix.html">io</a>::<a href="../io/IOException.html">IOException</a>,<br> ::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/IllegalArgumentException.html">IllegalArgumentException</a> );</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>loads a component specified by an URL into the specified new or existing frame. </dd> <dt><b>Parameter URL</b></dt> <dd>specifies the URL of the document to load <p> To create new documents, use "private:factory/scalc", "private:factory/swriter", etc. Other special protocols (e.g. "slot:", ".uno") are not allowed and raise an ::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/IllegalArgumentException.html">IllegalArgumentException</a>. </p> </dd> <dt><b>Parameter TargetFrameName</b></dt> <dd>specifies the name of the frame to view the document in <p> If a frame with the specified name already exists, it is used, otherwise it is created. There exist some special targets which never can be used as real frame names: <table border=1> <tr> <td><strong>"_blank"</strong></td> <td>always creates a new frame</td> </tr> <tr> <td><strong>"_default"</strong></td> <td>special UI functionality<br>(e.g. detecting of already loaded documents, using of empty frames of creating of new top frames as fallback)</td> </tr> <tr> <td><strong>"_self", ""(!)</strong></td> <td>means frame himself</td> </tr> <tr> <td><strong>"_parent"</strong></td> <td>address direct parent of frame</td> </tr> <tr> <td><strong>"_top"</strong></td> <td>indicates top frame of current path in tree</td> </tr> <tr> <td><strong>"_beamer"</strong></td> <td>means special sub frame</td> </tr> </table> </dd> <dt><b>Parameter SearchFlags</b></dt> <dd>use the values of <a href="FrameSearchFlag.html">FrameSearchFlag</a> to specify how to find the specified <var>TargetFrameName</var> <p> Note: These flags are optional ones and will be used for non special target names only. </p> </dd> <dt><b>Parameter Arguments</b></dt> <dd>these arguments specify component or filter specific behavior <p> For example, "ReadOnly" with a boolean value specifies whether the document is opened read-only. "FilterName" specifies the component type to create and the filter to use, for example: "Text - CSV". For more information see ::com::sun::star::<a href="../document/module-ix.html">document</a>::<a href="../document/MediaDescriptor.html">MediaDescriptor</a>. </p> </dd> <dt><b>Returns</b></dt> <dd>a ::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/XComponent.html">XComponent</a> for successfully loaded documents or <br> <b>NULL</b>if it failed <p> This interface is a generic one and can be used to start further requests on loaded document or control the lifetime of it (means dispose() it after using). The real document service behind this interface can be one of follow three ones: <ul> <li> ::com::sun::star::<a href="../awt/module-ix.html">awt</a>::<a href="../awt/XWindow.html">XWindow</a> for simple components<br/> Should be used for viewable components only. It is not allowed to dispose it after use directly, because the frame containing the component is its owner. Because the frame object is not accessible through the interface too, only an interacting user can do this by closing the frames' window. </li> <li> <a href="XController.html">XController</a> for richer components<br/> Should be used for real editable components which doesn't need a model. It is not allowed to dispose it after use directly, because the frame containing the component is its owner. Here the object can be disposed by disposing the frame, that the <a href="XController.html">XController</a>::<a href="XController.html#getFrame">getFrame()</a> method of the controller returns. But for visible components the controller should be asked for permission by calling <a href="XController.html">XController</a>::<a href="XController.html#suspend">suspend()</a> before. </li> <li> <a href="XModel.html">XModel</a> for full featured components<br/> A model that in general can be shared between several view/controller pairs, does not have an explicit owner. Every view and also the component that loaded the document may consider itself as an owner. Simply calling <method scope="com::sun::star::lang">XComponent::dispose</method> on this model may cause problems, if some members of the "owner community" are currently busy working on the model. These problems are handled by explicit closing negotiations through the interface ::com::sun::star::<a href="../util/module-ix.html">util</a>::<a href="../util/XCloseable.html">XCloseable</a>. Direct dispose of the model is allowed only, if this special interface doesn't exist. </li> </ul> </p> </dd> <dt><b>Throws</b></dt> <dd>com::sun::star::io::IOException when <var>URL</var> couldn't be found or was corrupt </dd> <dt><b>Throws</b></dt> <dd>com::sun::star::lang::IllegalArgumentException when given parameters doesn't perform the specification </dd> </dl> </td> </tr> </table> </td> </tr> </table> <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>