Essentials Overview Features License Installation FAQ Sample Sites Resources Todo Changes Download Binaries Source Code Supporting Projects Documentation Configuration Guide Javadocs Development Jetspeed Tutorial Portlet Catalog Components Registry Security Syndication WAP Customization Cache PSML Get Involved Contributors CVS Repository View CVS CVS Branches Coding Spec Bug Database |
Database Browser Portlet Class Name : org.apache.jetspeed.portal.portlets.browser.DatabaseBrowserPortlet Class Name : org.apache.jetspeed.modules.actions.portlets.browser.DatabaseBrowserAction
Description
> Presents the result set of a database query in a grid with columns representing selected columns, and rows representing each selected row of data. The SQL query string is configurable in portlet configuration mode.
> Supported Media Types
> Description of Media Types. html
Element: parameter
> Parameter that control the how the web page is converted into a portlet. This element is optional. Parameters common to many portlets.
> Parameter Name | Description
> --- | ---
> sql | The SQL String. Can be any valid SQL Query for your configured database. However it is required that the query returns at least one column. All selected columns of are represented as columns in the grid.
> windowSize | The number of rows presented in the grid at one time.
> template | The Velocity template to layout the database grid HTML in view mode. For many cases the default template is sufficient.
> customizeTemplate | The Velocity templated to layout the database grid HTML in customize mode. For many cases the default template is sufficient.
> poolName | To use a different Torque database connection pool than the default Torque pool. See the Jakarta Torque project documentation for more information on database connection pools.
Example of Registry Entry
>         <portlet-entry name="DatabaseBrowserTest" hidden="false" type="ref"
>             parent="DatabaseBrowserPortlet" application="false">
>             <meta-info>
>                 <title>DatabaseBrowserTest</title>
>                 <description>Simple Test Database Browser Portlet Example</description>
>             </meta-info>
>             <parameter name="template" value="database-browser-portlet" hidden="false"/>
>             <parameter name="customizeTemplate" value="database-browser-customize" hidden="false"/>
>             <parameter name="action" value="portlets.browser.DatabaseBrowserAction" hidden="false"/>
>             <parameter name="sql" value="select * from coffees" hidden="false"/>
>             <!-- to use an alternate torque pool, set this parameter -->
>             <!-- parameter name="poolname" value="otherpool" hidden="false"/-->
>             <parameter name="windowSize" value="5" hidden="false"/>
>             <media-type ref="html"/>
>         </portlet-entry>
Example of use in Portal
>             <entry id="P-ef1547a162-10018" parent="DatabaseBrowserTest">
>                 <parameter name="sql" value="select * from coffees"/>
>                 <parameter name="windowSize" value="10"/>
>             </entry>
Issues
Warning: this version of the portlet only supports vector-based result sets. This means that all rows from the result set are loaded into memory. Future releases will support a 'virtual' database browser, which will not load the entire result set into memory.
Copyright © 1999-2002, Apache Software Foundation