3839404142434445464748
String removeName = request.getParameter("remove"); if (removeName!=null) { // remove PortletPreferences prefs = request.getPreferences(); prefs.reset(removeName); prefs.store(); } String add = request.getParameter("add"); if (add!=null) { // add PortletPreferences prefs = request.getPreferences();
464748495051525354
if (add!=null) { // add PortletPreferences prefs = request.getPreferences(); prefs.setValue(request.getParameter("name"), request.getParameter("value")); prefs.store(); } } }
134135136137138139140141142143
PortletPreferences prefs = request.getPreferences(); prefs.setValue(WEATHER_CITY, city); prefs.setValue(WEATHER_STATE, state); prefs.setValue(WEATHER_STYLE, style); prefs.setValue(WEATHER_STATION, station); prefs.store(); super.processAction(request, response); } }
314315316317318319320321322323324
PortletPreferences prefs = request.getPreferences(); try { prefs.setValue(TOP_RANGE_NAME, topRange); prefs.store(); PortletSession session = request.getPortletSession(); session.setAttribute( TOP_RANGE_NAME, new Long(range), PortletSession.APPLICATION_SCOPE); } catch (Exception e) {
499500501502503504505506507508509
if (actionRequest.getPortletMode() == PortletMode.EDIT) { PortletPreferences prefs = actionRequest.getPreferences(); PreferencesHelper.requestParamsToPreferences(actionRequest); prefs.store(); actionResponse.setPortletMode(PortletMode.VIEW); return; } try
919293949596979899100
prefs.setValue(HEIGHT, height); prefs.setValue(WIDTH, width); prefs.setValue(MAX_SRC, maxSource); prefs.setValue(MAX_HEIGHT, maxHeight); prefs.setValue(MAX_WIDTH, maxWidth); prefs.store(); super.processAction(request, response); } }
560561562563564565566567568569570
{ if (actionRequest.getPortletMode() == PortletMode.EDIT) { PortletPreferences prefs = actionRequest.getPreferences(); PreferencesHelper.requestParamsToPreferences(actionRequest); prefs.store(); actionResponse.setPortletMode(PortletMode.VIEW); initPrefsAndAttr(actionRequest); actionRequest.getPortletSession().removeAttribute(SUBSITES_CONTROL); return; }
289290291292293294295296297298299
} PortletPreferences prefs = request.getPreferences(); try { prefs.setValue(TOP_RANGE_NAME, topRange); prefs.store(); PortletSession session = request.getPortletSession(); session.setAttribute( TOP_RANGE_NAME, new Long(range), PortletSession.APPLICATION_SCOPE); } catch (Exception e) {
172173174175176177178179180181182
PortletPreferences preferences = req.getPreferences(); boolean exceptionThrown = false; try { preferences.setValue("VALIDATION_TEST_KEY", " Spaces removed by trim "); preferences.store(); } catch (ReadOnlyException roe) { } catch (ValidatorException e) {
210211212213214215216217218219220
String pref = preferences.getValue("dummyName", "Default"); if("notTheOriginal".equals(pref)) { setOccured = true; } preferences.store(); if("notTheOriginal".equals(preferences.getValue("dummyName", "Default"))) { storeOccured = true; } preferences.reset("dummyName");