Examples of PortletPreferences


Examples of com.dotcms.repackage.javax.portlet.PortletPreferences

//    PortletPreferences portletPrefs =
//      PortletPreferencesManagerUtil.getPreferences(
//        companyId, PortalUtil.getPortletPreferencesPK(req, portletId));

    PortletPreferences portletPrefs = null;
   
    PortletConfig portletConfig = PortalUtil.getPortletConfig(portlet, ctx);
    PortletContext portletCtx = portletConfig.getPortletContext();

    WindowState windowState = new WindowState(
View Full Code Here

Examples of com.liferay.portal.model.PortletPreferences

                 * getString() method is called on a LONG field on an Oracle database. Because of this,
                 * the object is loaded from liferay and DotConnect is not used
                 * http://jira.dotmarketing.net/browse/DOTCMS-1911
                 */
                for (int j = 0; j < l.size(); j++) {
                    PortletPreferences portletPreferences = (PortletPreferences)l.get(j);
                    DotConnect dc = new DotConnect();
                    dc.setSQL("insert into portletpreferences values (?,?,?,?)");
                    dc.addParam(portletPreferences.getPortletId());
                    dc.addParam(portletPreferences.getUserId());
                    dc.addParam(portletPreferences.getLayoutId());
                    dc.addParam(portletPreferences.getPreferences());
                    dc.getResults();
                }
            }else if (_importClass.equals(User.class)) {
                for (int j = 0; j < l.size(); j++) {
                    User u = (User)l.get(j);
View Full Code Here

Examples of javax.portlet.PortletPreferences

     
      addUIFormInput(new UIFormStringInput(EMAIL_ADDRESS, EMAIL_ADDRESS, null).addValidator(MandatoryValidator.class).addValidator(
         EmailAddressValidator.class));
  
      PortletRequestContext pcontext = (PortletRequestContext)WebuiRequestContext.getCurrentInstance();
      PortletPreferences pref = pcontext.getRequest().getPreferences();
      boolean useCaptcha = Boolean.parseBoolean(pref.getValue(UIRegisterEditMode.USE_CAPTCHA,"true"));

      if (useCaptcha)
      {
         addUIFormInput(new UICaptcha(CAPTCHA, CAPTCHA, null).addValidator(MandatoryValidator.class).addValidator(CaptchaValidator.class));
         this.captchaInputAvailability = true;
View Full Code Here

Examples of javax.portlet.PortletPreferences

   public static final String USE_CAPTCHA = "useCaptcha";
  
   public UIRegisterEditMode() throws Exception
   {
      PortletRequestContext pcontext = (PortletRequestContext)WebuiRequestContext.getCurrentInstance();
      PortletPreferences pref = pcontext.getRequest().getPreferences();
      boolean useCaptcha = Boolean.parseBoolean(pref.getValue(USE_CAPTCHA,"true"));
      addUIFormInput(new UIFormCheckBoxInput<Boolean>(USE_CAPTCHA, USE_CAPTCHA, useCaptcha).setValue(useCaptcha));
   }
View Full Code Here

Examples of javax.portlet.PortletPreferences

      {
         // TODO Auto-generated method stub
         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

Examples of javax.portlet.PortletPreferences

      PortletRequestContext context = (PortletRequestContext)WebuiRequestContext.getCurrentInstance();

      UIDashboard dashboard = addChild(UIDashboard.class, null, null);
      addChild(UIDashboardEditForm.class, null, null);

      PortletPreferences pref = context.getRequest().getPreferences();
      String containerTemplate = pref.getValue("template", "three-columns");
      dashboard.setContainerTemplate(containerTemplate);

      String aggregatorId = pref.getValue("aggregatorId", "rssAggregator");
      dashboard.setAggregatorId(aggregatorId);
   }
View Full Code Here

Examples of javax.portlet.PortletPreferences

{
   public UIPortalNavigationPortlet() throws Exception
   {
      PortletRequestContext context = (PortletRequestContext)WebuiRequestContext.getCurrentInstance();
      PortletRequest prequest = context.getRequest();
      PortletPreferences prefers = prequest.getPreferences();
      String template = prefers.getValue("template", "app:/groovy/portal/webui/component/UIPortalNavigation2.gtmpl");

      UIPortalNavigation2 portalNavigation = addChild(UIPortalNavigation2.class, "UIHorizontalNavigation", null);
      portalNavigation.setUseAjax(Boolean.valueOf(prefers.getValue("useAJAX", "true")));
      portalNavigation.setTemplate(template);
   }
View Full Code Here

Examples of javax.portlet.PortletPreferences

   }

   public String getUrl()
   {
      PortletRequestContext pcontext = (PortletRequestContext)WebuiRequestContext.getCurrentInstance();
      PortletPreferences pref = pcontext.getRequest().getPreferences();
      String urlPref = pref.getValue("url", "http://www.google.com/ig/modules/horoscope.xml");
      if (urlPref.startsWith(LOCAL_STRING))
      {
         try
         {
            String gadgetName = urlPref.replaceFirst(LOCAL_STRING, "");
View Full Code Here

Examples of javax.portlet.PortletPreferences

     * @return The value of the portlet preference, <code>null</code> if the
     *         preference is not defined.
     */
    public String getPortletPreference(String name) {
        PortletRequest request = getRequest();
        PortletPreferences preferences = request.getPreferences();

        return preferences.getValue(name, null);
    }
View Full Code Here

Examples of javax.portlet.PortletPreferences

        Map<String, String> categoryKeywordsMap = retrieveCategoryKeywordsMap(categories, request);
        request.setAttribute("categoryKeywords", categoryKeywordsMap);
       
        request.setAttribute("layouts", LayoutBean.retrieveLayouts(request, decorationFactory));
        request.setAttribute("themes", ThemeBean.retrieveThemes(request, decorationFactory));
        PortletPreferences prefs = request.getPreferences();
        request.setAttribute("prefs", prefs.getMap());
       
        boolean hasEditAccess = false;
       
        try
        {
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.