previo | siguiente

What must a portal datasource provide?


A portal datasource must define some basic information - the datasource's name, the name of the application package it works with, etc.

Most importantly, a portal datasource must provide a template that renders information about objects controlled by the application package. For instance, the forums portlet datasource generates HTML output for recent posts to forums owned by its associated forums package. In many cases it is possible for a package and a portal datasource to share library templates to render output. Both the portal datasource and the package's index page may, for instance, include a common template to do the bulk of the work of rendering the main user page.

The portal package manages the placement of output returned by the various elements (instantiated portal datasources!) that are mapped to the regions and pages of a particular portal. The output of each element is rendered in an HTML table. As mentioned earlier, conceptually the portal package is a simple window manager, with each HTML table which contains the HTML generated by an element constituting a "window".

Like other window managers, the portal package decorates each window. The decoration to be used is controlled by assigning of a theme to a portal. Like many other window managers, the portal package allows the user to shrink windows, to hide them, or to move them from one region or page to another.