1 Reply Latest reply on Dec 8, 2010 12:00 PM by Trong Tran

    How to use containers in pages.xml

    Andre Winkler Newbie

      How can I use for example the "Autofit Two Columns" container in my pages.xml for my own portal definition (sample-portal).

       

      My pages looks like this at the moment:

       

      <page>
          <name>ReferenceApplication</name>
          <title>Finaware Portal</title>
          <access-permissions>finuser</access-permissions>
          <edit-permission>finadmin</edit-permission>
          <portlet-application>
            <portlet>
              <application-ref>FinawareWAR</application-ref>
              <portlet-ref>FinawareUserPortfolioList</portlet-ref>
            </portlet>
            <title>Portfolio list</title>
            <access-permissions>finuser</access-permissions>
            <show-info-bar>true</show-info-bar>
            <show-application-state>true</show-application-state>
            <show-application-mode>true</show-application-mode>
          </portlet-application>
          <portlet-application>
            <portlet>
              <application-ref>FinawareWAR</application-ref>
              <portlet-ref>FinawarePortfolioOverview</portlet-ref>
            </portlet>
            <title>Portfolio analysis</title>
            <access-permissions>finuser</access-permissions>
            <show-info-bar>true</show-info-bar>
            <show-application-state>true</show-application-state>
            <show-application-mode>true</show-application-mode>
          </portlet-application>
          <portlet-application>
            <portlet>
              <application-ref>FinawareWAR</application-ref>
              <portlet-ref>FinawarePositionList</portlet-ref>
            </portlet>
            <title>Position list</title>
            <access-permissions>finuser</access-permissions>
            <show-info-bar>true</show-info-bar>
            <show-application-state>true</show-application-state>
            <show-application-mode>true</show-application-mode>
          </portlet-application>
          <portlet-application>
            <portlet>
              <application-ref>FinawareWAR</application-ref>
              <portlet-ref>FinawarePerformance</portlet-ref>
            </portlet>
            <title>Position list</title>
            <access-permissions>finuser</access-permissions>
            <show-info-bar>true</show-info-bar>
            <show-application-state>true</show-application-state>
            <show-application-mode>true</show-application-mode>
          </portlet-application>
        </page>

      <page>

          <name>TestApplication</name>

          <title>Portal</title>

          <access-permissions>user</access-permissions>

          <edit-permission>admin</edit-permission>

       

          <portlet-application>

            <portlet>

              <application-ref>MyWAR</application-ref>

              <portlet-ref>TestPortlet1</portlet-ref>

            </portlet>

            <title>Portfolio list</title>

            <access-permissions>user</access-permissions>

            <show-info-bar>true</show-info-bar>

            <show-application-state>true</show-application-state>

            <show-application-mode>true</show-application-mode>

          </portlet-application>

       

          <portlet-application>

            <portlet>

              <application-ref>MyWAR</application-ref>

              <portlet-ref>TestPortlet2</portlet-ref>

            </portlet>

            <title>Portfolio analysis</title>

            <access-permissions>user</access-permissions>

            <show-info-bar>true</show-info-bar>

            <show-application-state>true</show-application-state>

            <show-application-mode>true</show-application-mode>

          </portlet-application>

       

          <portlet-application>

            <portlet>

              <application-ref>MyWAR</application-ref>

              <portlet-ref>TestPortlet3</portlet-ref>

            </portlet>

            <title>Position list</title>

            <access-permissions>user</access-permissions>

            <show-info-bar>true</show-info-bar>

            <show-application-state>true</show-application-state>

            <show-application-mode>true</show-application-mode>

          </portlet-application>

       

        </page>

       

      I want now the first two portlets place in an autofit two columns container. How can I do that?

       

      Thanks a lot.

        • 1. Re: How to use containers in pages.xml
          Trong Tran Master

          So your pages.xml would look like following :

           

          ...
          <container template="system:/groovy/portal/webui/container/UITableAutofitColumnContainer.gtmpl">
             <access-permissions>user</access-permissions>
             <factory-id>TableColumnContainer</factory-id>
          
          
             <container template="system:/groovy/portal/webui/container/UIContainer.gtmpl">
             <access-permissions>user</access-permissions>
          
              <portlet-application>
          
                <portlet>
          
                  <application-ref>MyWAR</application-ref>
          
                  <portlet-ref>TestPortlet1</portlet-ref>
          
                </portlet>
          
                <title>Portfolio list</title>
          
                <access-permissions>user</access-permissions>
          
                <show-info-bar>true</show-info-bar>
          
                <show-application-state>true</show-application-state>
          
                <show-application-mode>true</show-application-mode>
          
              </portlet-application>
          
             </container>
          
          
             <container template="system:/groovy/portal/webui/container/UIContainer.gtmpl">
             <access-permissions>user</access-permissions>
              <portlet-application>
          
                <portlet>
          
                  <application-ref>MyWAR</application-ref>
          
                  <portlet-ref>TestPortlet2</portlet-ref>
          
                </portlet>
          
                <title>Portfolio analysis</title>
          
                <access-permissions>user</access-permissions>
          
                <show-info-bar>true</show-info-bar>
          
                <show-application-state>true</show-application-state>
          
                <show-application-mode>true</show-application-mode>
          
              </portlet-application>
          
             </container>
          </container>
          ...