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));
    }

    portletPreferences.store();
  }