Package javax.portlet

Examples of javax.portlet.PortletPreferences.store()


        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

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

        if (actionRequest.getPortletMode() == PortletMode.EDIT)
        {
            PortletPreferences prefs = actionRequest.getPreferences();
            PreferencesHelper.requestParamsToPreferences(actionRequest);
            prefs.store();
            actionResponse.setPortletMode(PortletMode.VIEW);
            return;
        }
       
        try
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

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

        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

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.