Package javax.portlet

Examples of javax.portlet.PortletPreferences.store()


            }

            PortletRequestContext pcontext = (PortletRequestContext) WebuiRequestContext.getCurrentInstance();
            PortletPreferences pref = pcontext.getRequest().getPreferences();
            pref.setValue("url", uiForm.getUIStringInput(FIELD_URL).getValue());
            pref.store();

            UIPortalApplication portalApp = Util.getUIPortalApplication();
            if (portalApp.getModeState() == UIPortalApplication.NORMAL_MODE) {
                pcontext.setApplicationMode(PortletMode.VIEW);
            }
View Full Code Here


            // We are trying to choose a background;  first verify the requested image is actually in the set...
            String[] images = prefs.getValues(names.getImageSetPreferenceName(), EMPTY_STRING_ARRAY);
            if (Arrays.asList(images).contains(backgroundImage)) {
                try {
                    prefs.setValue(names.getSelectedBackgroundImagePreferenceName(), backgroundImage);
                    prefs.store();
                } catch (Exception e) {
                    throw new RuntimeException("Failed to store the user's choice of background image", e);
                }
            }
View Full Code Here

        } else {

            // We trying to clear a previous selection
            try {
                prefs.reset(names.getSelectedBackgroundImagePreferenceName());
                prefs.store();
            } catch (Exception e) {
                throw new RuntimeException("Failed to reset the user's choice of background image", e);
            }

        }
View Full Code Here

            PortletPreferences prefs = request.getPreferences();
            prefs.setValue(SqlQueryPortletController.DATASOURCE_BEAN_NAME_PARAM_NAME, form.getDataSource());
            prefs.setValue(SqlQueryPortletController.SQL_QUERY_PARAM_NAME, form.getSqlQuery());
            prefs.setValue(SqlQueryPortletController.VIEW_PARAM_NAME, form.getViewName());
            prefs.setValue(SqlQueryPortletController.PREF_CACHE_NAME,form.getCacheName());
            prefs.store();
        }
   
    response.setPortletMode(PortletMode.VIEW);

  }
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

                Connection con = null;
                try
                {
                    PortletPreferences prefs = request.getPreferences();
                    PreferencesHelper.requestParamsToPreferences(request);
                    prefs.store();
                    con = getConnection(request);
                    StatusMessage msg = new StatusMessage("Connection made successfully.", StatusMessage.SUCCESS);
                    PortletMessaging.publish(request, "DatabaseBrowserPortlet", "dbConnectTest", msg);
                }
                catch (Exception e)
View Full Code Here

            {
                if (editAction.equals("configPage1"))
                {
                    PortletPreferences prefs = request.getPreferences();
                    PreferencesHelper.requestParamsToPreferences(request);
                    prefs.store();
                    response.setPortletMode(PortletMode.EDIT);
                    response.setRenderParameter("configPage", editAction);
                    response.setRenderParameter(TABLE_NAME, request.getParameter(TABLE_NAME));
                    return;
                }
View Full Code Here

                }
                else if (editAction.equals("save"))
                {
                    PortletPreferences prefs = request.getPreferences();
                    PreferencesHelper.requestParamsToPreferences(request);
                    prefs.store();                   
                    response.setPortletMode(PortletMode.VIEW);
                }               
            }
        }
        super.processAction(request, response);       
View Full Code Here

    if ( dt == null ) return ;
    PortletPreferences prefs = request.getPreferences();
    try
    {
      prefs.setValue( dt.getName(), dt.getPath() );
      prefs.store();
    }
    catch ( ReadOnlyException e ) { }
    catch ( IOException e ) { }
    catch ( ValidatorException e ) { }
    }
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.