In liferay portlet preferences I am getting unsupportedoperationexception

StackOverflow https://stackoverflow.com/questions/23237982

  •  07-07-2023
  •  | 
  •  

質問

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