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