Package javax.portlet

Examples of javax.portlet.PortletPreferences.store()


            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

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

        try
        {
          ((ActionResponse)prc.getPortletResponse()).setPortletMode(PortletMode.VIEW);
          prefs.setValue(WicketExamplesMenuPortlet.EXAMPLE_APPLICATION_PREF, selected
              .getFilterPath());
          prefs.store();
        }
        catch (Exception pe)
        {
          throw new RuntimeException(pe);
        }
View Full Code Here

        try
        {
          ((ActionResponse)prc.getPortletResponse()).setPortletMode(PortletMode.VIEW);
          prefs.setValue(WicketExamplesMenuPortlet.EXAMPLE_APPLICATION_PREF,
            selected.getFilterPath());
          prefs.store();
        }
        catch (Exception pe)
        {
          throw new RuntimeException(pe);
        }
View Full Code Here

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

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

        if (add!=null)
        { // add                    
            PortletPreferences prefs = request.getPreferences();
            prefs.setValue(request.getParameter("name"),                          
                    request.getParameter("value"));    
            prefs.store();                         
        }
    }
}
View Full Code Here

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