I am getting unsupportedoperationexception in liferay 6.2 while using portletpreferences.
I am getting preferences from here

  PortletPreferences prefs = request.getPreferences(); 

Then setting the value in preferences

  prefs.setValue("test", "test"); 
  prefs.store();
有帮助吗?

解决方案

Get portletPreferences using code below:

   String portletResource = ParamUtil.getString(
                actionRequest, "portletResource");

   PortletPreferences portletPreferences = PortletPreferencesFactoryUtil.getPortletSetup(
                    actionRequest, portletResource);
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top