List of usage examples for com.liferay.portal.kernel.model Portlet getAllPortletModes
public java.util.Set<String> getAllPortletModes();
From source file:com.liferay.portlet.configuration.web.internal.portlet.PortletConfigurationPortlet.java
License:Open Source License
public void editSupportedClients(ActionRequest actionRequest, ActionResponse actionResponse) throws Exception { Portlet portlet = ActionUtil.getPortlet(actionRequest); PortletPreferences portletPreferences = actionRequest.getPreferences(); actionRequest = ActionUtil.getWrappedActionRequest(actionRequest, portletPreferences); Set<String> allPortletModes = portlet.getAllPortletModes(); for (String portletMode : allPortletModes) { String mobileDevicesParam = "portletSetupSupportedClientsMobileDevices_" + portletMode; boolean mobileDevices = ParamUtil.getBoolean(actionRequest, mobileDevicesParam); portletPreferences.setValue(mobileDevicesParam, String.valueOf(mobileDevices)); }/*w w w . j a v a 2s . c om*/ portletPreferences.store(); }