Package javax.portlet

Examples of javax.portlet.PortletPreferences.store()


        String prefValues = (String) attribute.getValue();
        String[] values = prefValues.split(",");
        pref.setValues(prefName, values);
      }
    }
    pref.store();
    /*
    SessionContainer session = getRequestContainer().getSessionContainer();
    RequestContainer requestContainer = this.getRequestContainer();
    PortletRequest portReq = PortletUtilities.getPortletRequest();
    PortletPreferences pref = portReq.getPreferences();
View Full Code Here


        prefs.setValue("baseWorkflowName", selectedWorkflowName);
        prefs.setValue("ownerID", owner);
        prefs.setValue("ownerName", ownerName);
       
        //Read, validate, and then set form parameters as portlet preferences
        prefs.store();
        logger.info("Base workflow is set to " + selectedWorkflowName);
        SessionMessages.add(actionRequest, portletConfig.getPortletName() + ".doConfigure");
    }

    @Override
View Full Code Here

      }

      portletSetup.setValue(key, value);
    }

    portletSetup.store();

    if (rootPortletId.equals(PortletKeys.NESTED_PORTLETS)) {
      JSONArray columnsJSONArray =
        portletPreferencesJSONObject.getJSONArray("columns");
View Full Code Here

        PortletPreferences prefs = actionRequest.getPreferences();
        String greeting = actionRequest.getParameter("greeting");

        if (greeting != null) {
            prefs.setValue("greeting", greeting);
            prefs.store();
        }

        SessionMessages.add(actionRequest, "success");
        super.processAction(actionRequest, actionResponse);
    }
View Full Code Here

        PortletPreferences prefs = actionRequest.getPreferences();
        String greeting = actionRequest.getParameter("greeting");

        if (greeting != null) {
            prefs.setValue("greeting", greeting);
            prefs.store();
        }

        super.processAction(actionRequest, actionResponse);
    }
View Full Code Here

        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) {
View Full Code Here

            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");
View Full Code Here

            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");
View Full Code Here

            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);
View Full Code Here

    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();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.