1 2 Previous Next 19 Replies Latest reply on Aug 21, 2007 6:04 PM by kpalania Go to original post
      • 15. Re: Configuring JBoss Portlets by default
        peterj

        On second thought, if you have a portlet named SomePortlet, then here are the full ad complete contents for portlet-instances.xml and *-object.xml to get the portlet to show up on the default page:

        portlet-instances.xml:

        <deployments>
         <deployment>
         <instance>
         <instance-id>SomePortletInstance</instance-id>
         <portlet-ref>SomePortlet</portlet-ref>
         </instance>
         </deployment>
        </deployments>


        some-object.xml:
        <deployments>
         <deployment>
         <if-exists>overwrite</if-exists>
         <parent-ref>default.default</parent-ref>
         <window>
         <window-name>SomePortletWindow</window-name>
         <instance-ref>SomePortletInstance</instance-ref>
         <region>center</region>
         <height>1</height>
         </window>
         </deployment>
        </deployments>


        • 16. Re: Configuring JBoss Portlets by default
          kpalania

          That is exactly how I have it, Peter. No difference at all (not sure if I can post the entire file since it is our source code, etc - see what I mean). The only additional thing to note is this -

          <deployments>
           <deployment>
           <parent-ref/>
           <if-exists>keep</if-exists>
           <portal>
           <portal-name>default</portal-name>
          ....
           <page>
           <page-name>default</page-name>
           <properties>
           <property>
           <name>order</name>
           <value>1</value>
           </property>
           </properties>
           <window>
           <window-name>SomePortletWindow</window-name>
           <instance-ref>SomePortletInstance</instance-ref>
           <region>center</region>
           <height>1</height>
           </window>
           </page>
          </deployment>
          <deployment>
          ..other deployments here..


          • 17. Re: Configuring JBoss Portlets by default
            kpalania

            We have additional deployment entries but I've added the portlets to the first one (the one shown above). I've verified that the JBP_WINDOWS table gets populated with this new portlet. So, there IS an entry in this table, so it does mean that something is getting picked up from this file. Just that it doesn't show up on the page and when I edit the configuration, I don't see any portlets as being exposed in any region..

            • 18. Re: Configuring JBoss Portlets by default
              kpalania

              ok, by trial and error, i found the right deployment element to stick my portlet entries in. Don't know yet why one works and not the other, or what is the difference between these elements, but nevertheless, i can add a portlet to the default page this way.

              however, adding a second portlet doesn't work, and it seems to override the earlier portlets added, and ultimately, i only see 1 on the page..

              • 19. Re: Configuring JBoss Portlets by default
                kpalania

                ok, the window-name had to be unique. that was one of the problems but the bigger issue was finding the correct deployment parent element. need to find out what the others are meant for. fix is small, but took a while to get there :(

                thanks for your pointers, Peter. much appreciated.

                1 2 Previous Next