256257258259260261262263264265266
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");
308309310311312313314315316317318
String pref = preferences.getValue(BOGUS_KEY, "Default"); if("notTheOriginal".equals(pref)) { setOccured = true; } preferences.store(); if("notTheOriginal".equals(preferences.getValue(BOGUS_KEY, "Default"))) { storeOccured = true; } preferences.reset(BOGUS_KEY);
522523524525526527528529530531532
if (curMode == PortletMode.EDIT || curMode.equals(JetspeedActions.EDIT_DEFAULTS_MODE)) { PortletPreferences prefs = actionRequest.getPreferences(); PreferencesHelper.requestParamsToPreferences(actionRequest); prefs.store(); actionResponse.setPortletMode(PortletMode.VIEW); return; } try
7576777879808182838485
try { ((ActionResponse)prc.getPortletResponse()).setPortletMode(PortletMode.VIEW); prefs.setValue(WicketExamplesMenuPortlet.EXAMPLE_APPLICATION_PREF, selected .getFilterPath()); prefs.store(); } catch (Exception pe) { throw new RuntimeException(pe); }
7879808182838485868788
try { ((ActionResponse)prc.getPortletResponse()).setPortletMode(PortletMode.VIEW); prefs.setValue(WicketExamplesMenuPortlet.EXAMPLE_APPLICATION_PREF, selected.getFilterPath()); prefs.store(); } catch (Exception pe) { throw new RuntimeException(pe); }
291292293294295296297298299300301
} 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) {
4748495051525354555657
public String execute() throws Exception { ActionRequest req = PortletActionContext.getActionRequest(); PortletPreferences prefs = req.getPreferences(); prefs.setValue("preferenceOne", preferenceOne); prefs.setValue("preferenceTwo", preferenceTwo); prefs.store(); return SUCCESS; } public String showForm() throws Exception { PortletPreferences prefs = PortletActionContext.getRequest().getPreferences();
3738394041424344454647
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();
454647484950515253
if (add!=null) { // add PortletPreferences prefs = request.getPreferences(); prefs.setValue(request.getParameter("name"), request.getParameter("value")); prefs.store(); } } }
90919293949596979899
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); } }