11.2. Widget portlet configuration

It is possible to modify certain behavior of caching and fetching widgets by changing the init-param values of the portlet.
  • connectionTimeout. Connection timeout used for the directory lookup in milliseconds.
  • widgetExpiration. Time in minutes for which a widget should be cached. After this time the cached widget information will be deleted and fetched again when the information are needed.
  • queryExpiration. Times in minutes for which a directory query should be cached. After this time the cached query information will be deleted.
  • fetchWidgetsOnDirectoryLookup. This parameter defines if all widgets from a directory lookup should be fetched at the time of the query or not. The default values is false. This means that widgets are only fetched on demand - when the information is really needed.
The parameter for both widget types can be changed identically in either:
  • jboss-portal.sar/portal-widget.war/WEB-INF/portlet.xml (for google gadgets)
  • or jboss-portal.sar/portal-widget-netvibes.war/WEB-INF/portlet.xml (for netvibes widgets).
...
   <portlet>
      ...
      <init-param>
         <name>connectionTimeout</name>
         <value>5000</value>
      </init-param>
      <init-param>
         <name>widgetExpiration</name>
         <value>360</value>
      </init-param>
      <init-param>
         <name>queryExpiration</name>
         <value>60</value>
      </init-param>
      <init-param>
        <name>fetchWidgetsOnDirectoryLookup</name>
        <value>false</value>
      </init-param>
    ...
   </portlet>
...
For Netvibes widgets it is also possible to define a init-param called defaultHeight to set a specific default height if no height attribute is defined by the widget itself. The default value is 250.