3. ViewPortlet

3.1. Introduction

This portlet is most frequently used, although the portlet itself is pretty simple. It's used for any application based on the “ViewPlugin” (Section 2.2).

3.2. Parameters

Table 5.3.  Portlet parameters for ViewPortlet

NameTypeDefaultDescription
viewplugin.viewbasedirStringNULL

Path to the directory that holds the views definition files for the portlet. The path may contain “System properties” (Section 2). It is strongly recommended to place the views in a directory somewhere under WEB-INF/ of your portletapplication.

See Example 5.1, “Example of views configuration for the ViewPortlet” and Section 2.2.4, “Parameters” for more details on the parameters of the viewplugin.

viewplugin.doubleclickprotectionBooleanNULL

Parameter to overwrite the portal-wide setting for the double-click protection. The default is to not overwrite the portal-wide setting (which itself defaults to true ). See “ViewPlugin Configuration” (Section 8.2.11) for details on the global setting.

datasourceStringNULLId of the default datasource to be used in this portlet. The datasource configured here will be used as default in every component that uses datasources.

Example 5.1. Example of views configuration for the ViewPortlet

  • Place the views files in the directory WEB-INF/[portletid]/views of your portletapplication.

  • Set the portlet parameter viewplugin.viewbasedir to ${com.gentics.portalnode.apps.[portletapplication].path}/WEB-INF/[portletid]/views , where [portletapplication] is the context path of your portletapplication and [portletid] the id of your portlet.

3.3. Events of the ViewPortlet

The ViewPortlet does not trigger any events on its own, but the ViewPlugin (which is used in the ViewPortlet) does. See “ViewPlugin events” (Section 3.4) for details.