OpenWGA 7.10 - OpenWGA Concepts and Features

Design and development » WebTML » Features » Portlets

Changes to portlets since OpenWGA 6.2

This may be of interest for developers which have learned using portlets for an OpenWGA version prior to 6.2.

With OpenWGA 6.2 the WebTML portlet functionality underwent major changes in the way portlets are managed internally, at least regarding new applications. Since this version WebTML portlets are actually transient and not registered persistently. Additionally the status of each portlet - mode, context and portlet variables - is stored on the client side in the users browser and is kept there for the time the browser window is kept open. The browser then sends the status of affected portlets back to the server when needed. This has the following advantages:

  • Low footprint: The server needs to store dramatically less data about each portlet. This benefits database size and speed of portlet operations, especially on applications with very many portlets, and improves overall scalability.
  • Independent application windows: As the state is stored for each browser window it is now possible to have the same application open in multiple windows with different states, i.e. using different application functions. These now work fully independent regarding portlets.

Transient portlets can still store items persistently on their portlet configuration. These still get stored on the user profile and are available on later sessions. The only thing that needs to be made sure is that the portlet path of a special portlet stays the same between its invocations. As a portlet is now identified primarily by that it will only be able to fetch previously stored items on the portlet configuration if it keeps this path.

This all actually has no major impact on development regarding the normal way of including portlets with <tml:include type="portlet"> or <tml:portlet>. This form of portlet usage never really used the registry in a reading manner. The WebTML module called via URL and the modes and contexts of portlets actually decide what WebTML portlets are displayed and these just got re-registered again on every request in OpenWGA. Only when manually working with portlet registrations in TMLScript via portlet.getPortletForName() and portlet.registerPortletForName() the registry was actually used (see "notable changes" below).

Notable changes when working with transient portlets in contrast to persistent portlets:

  • The default of AJAX on portlets and action links is now "true". All portlets and actions use it by default. So AJAX must be disabled if it is not desired.
  • If you manually register and retrieve portlets using TMLScript methods with portlet.registerPortletForName() and portlet.getPortletForName() then you should be aware that there is no real "persistent portlet registration" any more. Every "portlet registration" is only valid for one request and gone on the next. However you can safely re-register portlets which you need if you use the same portlet names again. A portlet with the same portlet path as a portlet that was registered on an earlier request will be regarded "the same" by OpenWGA and use the state and configuration from that previous portlet.
  • If you actually used the portlet registration to determine, which portlets to display you cannot use the new transient portlet registry for that. You can either choose to continue using the old portlet registry (see "choose to use..." below) or use portlet items for building your own custom registry.

Transient portlets are the default for OpenWGA applications with a design compliance of version 6.2 or higher. Applications with a lower compliance level will still use the old persistent portlet registry, whose functionality is still available and will still completely behave the same. However this documentation does no longer reflect the way this persistent portlet registry works. If you need information about this legacy functionality please use the WebTML portlets chapter on the documentation of OpenWGA 6.0.

You can also choose to use the new or old portlet handling for your existing applications without changing the compliance. When running on OpenWGA 6.2 every application may freely and explicitly choose which portlet functionality it wants to use with publisher option "Portlet registry mode":

  • Either configure your application in OpenWGA Admin Client with this publisher option set (Section "Publishing settings"), setting it to either to "Transient" or "Persistent"
  • Or set it on your design configuration, tab "Advanced". There under "Publisher options" you need to use the internal name of this option "PortletRegistryMode" as option name and the value "transient" or "persistent".