In a portlet, you can use BI Beans thin presentation beans to display a single page of data, without interaction such as drilling or rotating the data. You can allow users to customize the portlet contents by having them open a full-page HTML-client application.
To prevent user interaction with a thin presentation bean, set the Enabled
property of the thin presentation bean to false
.
To display a single page of data efficiently, you should cache the presentation
bean by creating a DataviewCache
. The simplest way to do this is
to call the getCachedView
method of the DataviewCacheUtils
class. Both DataviewCache
and DataviewCacheUtils
are
defined in the oracle.dss.thin.portalUtil
package. The getCachedView
method creates a cached presentation in the BI Beans Catalog, giving it the
persistence object type of DATAVIEWCACHE
. This object type makes
it possible to distinguish between a presentation and a cached presentation
in the Catalog.
To retrieve a cached presentation from the BI Beans Catalog, call the getCachedView
method of the DataviewCacheUtils
class.
The following code disables a crosstab and caches it in the Catalog. Note that
the data is also cached with the presentation. This example assumes a thin crosstab
that is named crosstab
, a persistence manager that is named rootFolder
,
a MyCrosstabs
folder in the Catalog, and a Caches
folder that is a subfolder of MyCrosstabs
.
crosstab.setEnabled(false); // cache the thin crosstab in the Catalog // "all" String is for scoping -- defined by the application DataviewCommon cachedCrosstab = DataviewCacheUtil.getCachedView(rootFolder, null, "MyCrosstabs/Caches", "all");
The following code example loads a cached presentation from the BI Beans Catalog. This example assumes all of the objects and folders from the previous example.
ThinCrosstab crosstab = (ThinCrosstab)DataviewCacheUtils.getCachedView(rootFolder, null, "MyCrosstabs/Caches", "all");