If you are using ConfigurationAction retrieve portletPreferences like this in java
1String portletResource = ParamUtil.getString(
2 actionRequest, "portletResource");
3
4 PortletPreferences preferences =
5 PortletPreferencesFactoryUtil.getPortletSetup(
6 actionRequest, portletResource);
7preferences().setValue("greeting", greeting);
8preferences().store();
And in jsp use this
1
2PortletPreferences preferences = renderRequest.getPreferences();
3
4String portletResource = ParamUtil.getString(request, "portletResource");
5
6if (Validator.isNotNull(portletResource)) {
7 preferences = PortletPreferencesFactoryUtil.getPortletSetup(request, portletResource);
8}
9String greeting = preferences.getValue("greeting", "no peferences");
Regards,
Sandeep
Please sign in to flag this as inappropriate.