Advanced Parameters

Database Connection Pool

By default, the database browser portlet uses the default Torque data source and connection pool. To select another connection pool, add the poolname parameter to your portlet?s registry entry:


<!-- to use an alternate torque pool, set this parameter -->
<parameter name="poolname" value="otherpool" hidden="true"/>

The name of the pool must match the name of the data source in the Torque.properties file. See the Torque documentation for details on configuring data sources.

User Objects

There may be times when you need to attach additional information to each row in the browser. For example, you are implementing a tree view over a joined database query, and you need to track whether a row is expanded or contracted to show the detail lines. The state of each row can be attached to the row with User Objects. A user object can be any Java class. The user object can also be accessed in your Velocity template.

The class name of the user object is specified with the user-object-types parameter, a comma separated list of Java class names. For each row in result set, a new class of this type is created and attached to the browser row.


<parameter name="user-object-types"
value="org.apache.jetspeed.tutorial.modules.actions.portlets.ExampleBrowserItem" hidden="true"/>

<parameter name="user-object-names" value="userObject" hidden="true"/>