Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.1.11
-
None
-
Normal
-
Patch available
Description
The CocoonPortlet in BRANCH_2_1_X does not allow overriding the *servlet-path* init parameter by preferences.
If the CocoonPortlet reads preferences to override the 'servlet-path', portal users can use manycoplet fragments without tedious portlet tag additions.
FYI, some portals such as Jetspeed 2 allows inline preference settings, not allowed for end-users.
Without this feature, portal users have to add portlet tags in the portlet.xml whenever they need to use another coplet in the portal site.
To test properly for the patch, you should add init-parameter in the cocoon/WEB-INF/portlet.xml like the
following:
<portlet>
<portlet-name>CocoonPortlet</portlet-name>
...
<init-param>
<name>allow-preferences</name>
<value>true</value>
</init-param>
...
</portlet>
ManagedCocoonPortlet will read preferences just when the above parameter is set to true. (I borrowed this from GenericServletPortlet in Apache portal bridges.)
I've tested this modification under Jetspeed-2 (/WEB-INF/pages/default-page.psml).
The portlet fragment can be added with preferences like the following:
<fragment id="dp-19" type="portlet" name="cocoon::CocoonPortlet">
<property name="row" value="6"/>
<property name="column" value="0"/>
<preference name="servlet-path" readOnly="true">
<value>samples/blocks/portal/portlets/helloworld</value>
</preference>
</fragment>
If the CocoonPortlet reads preferences to override the 'servlet-path', portal users can use manycoplet fragments without tedious portlet tag additions.
FYI, some portals such as Jetspeed 2 allows inline preference settings, not allowed for end-users.
Without this feature, portal users have to add portlet tags in the portlet.xml whenever they need to use another coplet in the portal site.
To test properly for the patch, you should add init-parameter in the cocoon/WEB-INF/portlet.xml like the
following:
<portlet>
<portlet-name>CocoonPortlet</portlet-name>
...
<init-param>
<name>allow-preferences</name>
<value>true</value>
</init-param>
...
</portlet>
ManagedCocoonPortlet will read preferences just when the above parameter is set to true. (I borrowed this from GenericServletPortlet in Apache portal bridges.)
I've tested this modification under Jetspeed-2 (/WEB-INF/pages/default-page.psml).
The portlet fragment can be added with preferences like the following:
<fragment id="dp-19" type="portlet" name="cocoon::CocoonPortlet">
<property name="row" value="6"/>
<property name="column" value="0"/>
<preference name="servlet-path" readOnly="true">
<value>samples/blocks/portal/portlets/helloworld</value>
</preference>
</fragment>