Package javax.portlet

Examples of javax.portlet.PortletPreferences.store()


         UIRegisterEditMode uiForm = event.getSource();
         boolean useCaptcha = uiForm.getUIFormCheckBoxInput(USE_CAPTCHA).isChecked();
         PortletRequestContext pcontext = (PortletRequestContext)WebuiRequestContext.getCurrentInstance();
         PortletPreferences pref = pcontext.getRequest().getPreferences();
         pref.setValue(USE_CAPTCHA, Boolean.toString(useCaptcha));
         pref.store();
        
         //Show/hide the captcha input in UIRegisterInputSet
         UIRegisterPortlet registerPortlet = uiForm.getParent();
         UIRegisterInputSet registerInputSet = registerPortlet.findFirstComponentOfType(UIRegisterInputSet.class);
        
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

                }
               
                // store preferences
                if (storePrefs)
                {
                    prefs.store();
                }

                // log store preferences
                if (log.isDebugEnabled())
                {
View Full Code Here

                    FeedbackPanel feedback = (FeedbackPanel)this.getParent().get("feedback");
                    try
                    {
                        prefs.setValue("appRows", Integer.toString(EditModeForm.this.getAppRows()));
                        prefs.setValue("portletRows", Integer.toString(EditModeForm.this.getPortletRows()));
                        prefs.store();
                        ActionResponse ar = (ActionResponse)((ApplicationsListApplication)this.getApplication()).getPortletResponse();
                        ar.setPortletMode(PortletMode.VIEW);                       
                    }
                    catch (ReadOnlyException e)
                    {
View Full Code Here

            PortletPreferences prefs = request.getPreferences();
            try
            {
               
                prefs.setValue(getDateKey(this.date), this.notes);
                prefs.store();
            }
            catch (Exception e)
            {
                System.err.println("error storing prefs " + e);
            }
View Full Code Here

      if (null != zip)
      {
         PortletPreferences prefs = actionRequest.getPreferences();
         prefs.setValue(ZIP, zip);
         prefs.store();
      }

      // set zip as render parameter
      actionResponse.setRenderParameter(ZIP, zip);
View Full Code Here

            UIRegisterEditMode uiForm = event.getSource();
            boolean useCaptcha = uiForm.getUIFormCheckBoxInput(USE_CAPTCHA).isChecked();
            PortletRequestContext pcontext = (PortletRequestContext) WebuiRequestContext.getCurrentInstance();
            PortletPreferences pref = pcontext.getRequest().getPreferences();
            pref.setValue(USE_CAPTCHA, Boolean.toString(useCaptcha));
            pref.store();

            // Show/hide the captcha input in UIRegisterInputSet
            UIComponent registerPortlet = uiForm.getParent();
            UIRegisterInputSet registerInputSet = registerPortlet.findFirstComponentOfType(UIRegisterInputSet.class);
View Full Code Here

                if (!prefs.isReadOnly(key))
                {
                    prefs.setValue(key, (String) entry.getValue());
                }
            }
            prefs.store();
        }
        catch (ReadOnlyException roe)
        {
            throw new PortletException("Failed to set preference " + key + ", value is readonly");
        }
View Full Code Here

      if ( name == null ) name = "";
      PortletPreferences prefs = request.getPreferences();
      try
    {
        prefs.reset( name );
        prefs.store();
    }
    catch ( ReadOnlyException e ) { }
    catch ( IOException e ) { }
    catch ( ValidatorException e ) { }
    }
View Full Code Here

    public void processPreferencesAction(ActionRequest request, ActionResponse actionResponse)
    throws PortletException, IOException
    {
        PortletPreferences prefs = request.getPreferences();
        PreferencesHelper.requestParamsToPreferences(request);
        prefs.store();
        actionResponse.setPortletMode(PortletMode.VIEW);
    }
   
}
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.