3. Portal implementation

3.1. Introduction

The portal provides some basic events, which can be used for reactions.

3.2. Portal events

  • portal.events.onLogin - successfull user login

  • portal.events.onSessionCreate - new usersession

  • portal.events.onTemplateChange - a page impression where the output has changed somehow

  • portal.events.onPrepareRender - the lifecycle moment before rendering

3.3. PBox events

Events triggered, when pboxes change their state. These events are never triggered, when the implementation uses portal pages. See “Portal Page events” (Section 3.6) for details about the portal page events.

  • portal.pboxes.[pboxid].windowstate.onMinimized - The windowstate of the pbox was changed to "minimized"

  • portal.pboxes.[pboxid].windowstate.onNormal - The windowstate of the pbox was changed to "normal"

  • portal.pboxes.[pboxid].windowstate.onMaxmimized - The windowstate of the pbox was changed to "maximized"

  • portal.pboxes.[pboxid].portletmode.onView - The portletmode of the pbox was changed to "view"

  • portal.pboxes.[pboxid].portletmode.onEdit - The portletmode of the pbox was changed to "edit"

  • portal.pboxes.[pboxid].portletmode.onHelp - The portletmode of the pbox was changed to "help"

  • portal.pboxes.[pboxid].onModuleIdChange - The module id displayed in the pbox has changed. Event contains the properties: pbox and oldModuleId

3.4. ViewPlugin events

  • portal.modules.[moduleid].plugins.viewplugin.onViewChange - The active view has changed.

    • portlet The modified portlet.
    • oldview The id of the old view.
    • newview The id if the new view.

  • portal.events.onViewChange - The active view has changed (alias for portal.modules.[moduleid].plugins.viewplugin.onViewChange)

3.5. Portlet events

This section describes some general portlet events. The events are only triggered, when portal pages are used. See “Portal pages Configuration” (Section 8.2.15) for details about how to activate portal pages.

  • portal.events.portlet.onBeforeWindowStateChange - The windowstate of a portlet is about to be changed. The event contains the following properties:

    • portlet The modified portlet
    • position The position of the modified portlet
    • portalpage Portalpage of the modified portlet
    • oldwindowstate Name of the current windowstate (lowercase).
    • newwindowstate Name of the new windowstate (lowercase).

    Note that this event will be triggered, even if the portlet cannot change in the requested windowstate, because the position does not allow it.

  • portal.events.portlet.onWindowStateChange - The windowstate of a portlet was changed. The event contains the following properties:

    • portlet The modified portlet
    • position The position of the modified portlet
    • portalpage Portalpage of the modified portlet
    • windowstate Name of the new windowstate (lowercase).

  • portal.events.portlet.onPortletModeChange - The portletmode of a portlet was changed. The event contains the following properties:

    • portlet The modified portlet
    • position The position of the modified portlet
    • portalpage Portalpage of the modified portlet
    • portletmode Name of the new portletmode (lowercase).

  • portal.events.portlet.onChange - Is triggered when portlet positions are changed. The event contains the following properties:

    • portlet The modified portlet
    • position The position of the modified portlet
    • portalpage Portalpage of the modified portlet
    • index The index of the portlet in the current position

3.6. Portal Page events

Events triggered by portal pages. These events are never triggered, when the implementation does not use portal pages. See “PBox events” (Section 3.3) for details about pbox events.

  • portal.events.onBeforePageChange - the user is about to change the active portalpage (implicitly or explicitly). This event is triggered, before the page is actually changed and contains the following properties:

    • oldpage Id of the old portalpage.
    • newpage Id of the new portalpage.

  • portal.events.onPageChange - the user has changed the active portalpage (implicitly or explicitly). This event is triggered, after the page is changed and contains the following properties:

    • oldpage Id of the old portalpage.
    • newpage Id of the new portalpage.

  • portal.pages.[pageid].positions.[positionid].onChange - Portlets in the given position have changed (This can be because a portlet was added, removed or sorted differently. The event contains the following properties:

    • position The modified position.
    • portalpage The portal page of the position.
    • oldPortlets Collection as it were before the current change.

3.7. Custom action events

portal.events.actions.on[Actionname]

Events triggered, when custom actions are clicked by the user for a specific portlet entity. These events will only be triggered, when portal pages are used.

The event contains the following properties:

  • portlet The portlet entity for which the action was triggered
  • position The position of the portlet
  • portalpage Portalpage of the portlet

3.8. Reactions

Reactions can be defined in <pnode> Tags in the portal template or the portletentities file. See “PNodes” (Section 11.1.3) or “Portlet Entities Configuration” (Section 13) for details.

Reaction implementations can be made in two different ways:

  1. (deprecated) implement a list of assignments, each one in a new line. This implementation has some major limitations (no functions, may not contain quotes, ...) and is therefore deprecated.

  2. Implement a single expression (which can consume more than one line). If e.g. many assignments have to be done in the same reaction, this can be accomplished by using the function do(). For details on expressions see “ExpressionParser” (Section 10) .

Either way, one can use property paths starting with three base words in reactions:

  • portal for resolving portal properties (see “Portal” (Section 8.1) for a description of possible property paths)

  • event.properties for resolving event properties. See the event descriptions for details on the available properties.

  • portlet for resolving properties of the portlet-entity (pnode) holding the reaction. Paths based on portlet will resolve to null when the reaction is defined in the general reactions node of a portletentities definition.