4 Replies Latest reply on Apr 13, 2008 4:55 AM by erezharari

    Changing portlet preferences per portlet instance

    erezharari

      hi,
      in the admin application one can see portlet instance preferences, but not chnage them.
      in portlet-instances.xml a different set of preferences can be defined for each instance.
      however, changing that file only applys to new instances, not ones that have already been deployed..
      so, how can i change the preferences of a portlet instance during the development phase? is there a way to force 'override' behavior on portlet instance preferences ? (I'm using jboss portal 2.6.4-GA)

      erez

        • 1. Re: Changing portlet preferences per portlet instance

          It is possible you need to go in the "Portlet Instances" tab and if a portlet declares preferences it has a preferences action.

          • 2. Re: Changing portlet preferences per portlet instance
            erezharari

            this is correct. however, the preferences section of a portlet is read-only (for non read-only preferences as well).
            and more. when i redeploy a portlet instance for which i have overriden the orig preferences in portlet-instances.xml, the changes are not applied, as the instance is already deployed and there is no 'override' option in portlet-instances.xml.

            so is there a way to manually 'clear' the deployed instance (in database maybe) and allow the changes to be applied when i redeploy it?

            • 3. Re: Changing portlet preferences per portlet instance

               

              "erezharari" wrote:
              this is correct. however, the preferences section of a portlet is read-only (for non read-only preferences as well).
              and more. when i redeploy a portlet instance for which i have overriden the orig preferences in portlet-instances.xml, the changes are not applied, as the instance is already deployed and there is no 'override' option in portlet-instances.xml.

              so is there a way to manually 'clear' the deployed instance (in database maybe) and allow the changes to be applied when i redeploy it?


              I think there is an option that allows to do that which is the tag "if-exists" with the overwrite value.

              <instance>
              ...
              <if-exists>overwrite</if-exists>
              ...
              </instance>




              • 4. Re: Changing portlet preferences per portlet instance
                erezharari

                I'm afraid there is no if-exists element in portlet-instances_2_0.dtd.
                is there some workaround to force override in development mode?