5 Replies Latest reply on Apr 27, 2007 5:18 AM by cpage

    portletpreferences per user

      hi,

      is it possible to store portlet preferences per user with jboss portal mechanisms ?
      i mean, each user have to customize the content of a portlet.

      i could store preferences my self in a new simple table, if mechanisms exists, i take ! :D

      ty

      regards,

        • 1. Re: portletpreferences per user
          theute

          Yes it is part of the JSR 168, See PLT.15 of the sportlet spec. And the method store().

          • 2. Re: portletpreferences per user

             

            "thomas.heute@jboss.com" wrote:
            Yes it is part of the JSR 168, See PLT.15 of the sportlet spec. And the method store().


            yes, i already use the portletpreferences to store preferences.

            i asked the wrong question !

            is it possible that an admin user modify portlet preferences for a group of users or all users ?

            or, is it possible to get the portletpreferences of another user ?
            logged as user1 and get the admin prefs....



            • 3. Re: portletpreferences per user
              theute

              The admin can edit the preferences at the portlet instance level, so it will be for all users.

              (you can't do it per group of users)

              • 4. Re: portletpreferences per user

                thanks, that's what i need.

                i can do that with the management portlet.

                but, i need to do it programmaticaly in the portlet.
                only admin users access to mode edit of this portlet and had to change preferences.

                i need to acces to the injected service :

                <service-name>InstanceContainer</service-name>
                <service-class>org.jboss.portal.core.model.instance.InstanceContainer</service-class>
                <service-ref>:container=Instance</service-ref>


                how can i get the InstanceContainer object ?
                i tried with a lookup but without succes

                thanks very much

                regards


                • 5. Re: portletpreferences per user

                  i use that: and it works:

                  InstanceContainer container = (InstanceContainer)getPortletContext().getAttribute("InstanceContainer");



                  i had to inject the service InstanceContainer in the portlet context and use transaction to get my instance preferences.


                  works fine !

                  ty