3 Replies Latest reply on Apr 9, 2008 6:44 PM by julien1

    portlet preferences and portlet instances

    erezharari

      is it true that portlet preferences on user level is the same for the portlet instance for all its portlet windows?
      say i have the same portlet instance multiple times in a page or multiple pages and the user changes the portal preferences - does this change apply to all the windows the portlet instance is in?

      what about window properties? are they different for each user?

        • 1. Re: portlet preferences and portlet instances

          It is true for shared pages, it is not true in a dashboard.

          • 2. Re: portlet preferences and portlet instances
            erezharari

            oh,
            so in dasboards each window has dedicated set of user-portlet preferences?

            • 3. Re: portlet preferences and portlet instances

              yes.

              it could be possible to achieve smth similar with shared pages but would require a modification of the CustomizationManagerService to return a key for customization based on the window id + user id instead of only the user id

              here is the relevant code:

              Instance instance = instanceContainer.getDefinition(instanceId);
               if (instance != null)
               {
               // If we are in the context of an existing user we get a customization for that user
               if (user != null)
               {
               String userId = getUserId(user);
              
               // And if it is in a dashboard context we get the per window customization
               if (isDashboard(window, user))
               {
               // That's how we manufacture dash board keys
               String dashboardId = window.getId().toString();
              
               //
               instance = instance.getCustomization(dashboardId);
               }
               else
               {
               instance = instance.getCustomization(userId);
               }
               }
               }