8 Replies Latest reply on May 25, 2010 6:20 AM by Martial BRISOU

    How to create un page with 2 columns

    Martial BRISOU Newbie

      Hi,

       

      is it possible to configure page with portlets in 2 column container?

      I mean the configuration in: ../gatein.ear/02portal.war/WEB-INF/conf/portal/portal/classic/pages.xml.

       

      Here is sample:

       

      <page>
          <name>page</name>
          <title>pageTitle</title>
            <access-permissions>Everyone</access-permissions>
            <edit-permission>*:/platform/administrators</edit-permission>

            <container id="body" template="system:/groovy/portal/webui/container/UITableColumnContainer.gtmpl">
                  <container id="left" template="system:/groovy/portal/webui/container/UIContainer.gtmpl">

                       <application>
                               <instance-id>portal#classic:/web/SiteMapPortlet/SiteMapLeft</instance-id>
                               <title>Site Left</title>
                        </application>

                   </container>

                   <container id="right" template="system:/groovy/portal/webui/container/UIContainer.gtmpl">

                       <application>
                               <instance-id>portal#classic:/web/SiteMapPortlet/SiteMapRight</instance-id>
                               <title>Site Right</title>
                        </application>

                   </container>

            </container>

        </page>

       

      The columns are not displayed.

      In the console there are not errors

       

       

      Thanks in advance.

       

      Regards,

      Darlys and Martial

        • 1. Re: How to create un page with 2 columns
          Sully Zhang Newbie

          Look this discussion here:    http://community.jboss.org/thread/151511
          may be it will give you helpful info.

          • 2. Re: How to create un page with 2 columns
            Soren Schmidt Newbie

            Hello,

             

            here you find an example that works:

            http://community.jboss.org/message/523443#523443

             

            otherwise:

            1. I would rename the ids of your containers, they are to generic and you risk name collisions, call them "BrisouRight" etc.

            2. I cannot see

            <owner-type>portal</owner-type>
                 <owner-id>classic</owner-id>

            in your page definition.

            3. Verify

            a)  if "portal#classic:/web/SiteMapPortlet/SiteMapLeft" is correctly written, and

            b)  if you can see this application when showing it in a simple page.

             

             

            cu

            Naikos

            • 3. Re: How to create un page with 2 columns
              Martial BRISOU Newbie

              Hello Soren

               

                 What is the syntax to define instance-id element of element
              application?, the syntax that I understood is the following:

               

                 <instance-id>owner-type#owner-id:/warName/PortletName/IdUnique </ instance-id>

               

              Values:

              owner-type=portal (deafult value)

              owner-id=classic (default value)

              warName=web (this application exist)

              PortletName=SiteMapPortlet (existing portlet)

               

              Is it a way or the syntax is another?.

               

              I really want to modify the SiteMap page to see if I can define a page with containers.

              • 4. Re: How to create un page with 2 columns
                Martial BRISOU Newbie

                I tried this:

                 

                <page>
                    <name>page</name>
                    <title>pageTitle</title>
                      <access-permissions>Everyone</access-permissions>
                      <edit-permission>*:/platform/administrators</edit-permission>

                                 <application>
                                         <instance-id>portal#classic:/web/SiteMapPortlet/SiteMapLeft</instance-id>
                                         <title>Site Left</title>
                                  </application>

                  </page>

                 

                The page is not displayed.

                • 5. Re: How to create un page with 2 columns
                  Soren Schmidt Newbie

                  May I remind you my remark 2. ?

                  • 6. Re: How to create un page with 2 columns
                    Trong Tran Master

                    the correct one should be :

                     

                    <page>
                       <name>page</name>
                       <title>pageTitle</title>
                       <access-permissions>Everyone</access-permissions>
                       <edit-permission>*:/platform/administrators</edit-permission>

                     

                       <container id="body" template="system:/groovy/portal/webui/container/UITableColumnContainer.gtmpl">
                          <access-permissions>Everyone</access-permissions>

                     

                          <container id="left" template="system:/groovy/portal/webui/container/UIContainer.gtmpl">
                             <access-permissions>Everyone</access-permissions>
                             <application>
                                <instance-id>portal#classic:/web/SiteMapPortlet/SiteMapLeft</instance-id>
                                <title>Site Left</title>
                                <access-permissions>Everyone</access-permissions>
                             </application>
                          </container>

                     

                          <container id="right" template="system:/groovy/portal/webui/container/UIContainer.gtmpl">
                             <access-permissions>Everyone</access-permissions>
                             <application>
                                <instance-id>portal#classic:/web/SiteMapPortlet/SiteMapRight</instance-id>
                                <title>Site Right</title>
                                <access-permissions>Everyone</access-permissions>
                             </application>
                          </container>
                       </container>

                     

                    </page>

                    • 7. Re: How to create un page with 2 columns
                      Trong Tran Master

                      BTW, i suggest you to use the definition way of portlet from ( for sample ) :

                       

                                <application>
                                   <instance-id>portal#classic:/web/SiteMapPortlet/SiteMapLeft</instance-id>
                                   <title>Site Left</title>
                                  <access-permissions>Everyone</access-permissions>
                                </application>

                       

                      to

                       

                                 <portlet-application>
                                     <portlet>
                                        <application-ref>web</application-ref>
                                        <portlet-ref>SiteMapPortlet</portlet-ref>

                                         <preferences>
                                           <preference>
                                             <name>pref1</name>
                                             <value>value1</value>
                                             <read-only>false</read-only>
                                           </preference>

                                           <preference>
                                              <name>pref2</name>
                                              <value>value2</value>
                                              <read-only>true</read-only>
                                            </preference>

                                        </preferences>
                                     </portlet>
                                     <title>Site Left</title>
                                     <access-permissions>Everyone</access-permissions>
                                     <show-info-bar>false</show-info-bar>
                                  </portlet-application>

                       

                       

                      In new way, it allows you to define preferences inline the portlet definition

                      • 8. Re: How to create un page with 2 columns
                        Martial BRISOU Newbie

                        Great help!!! Works perfectly!

                         

                        Thank you very much Trong.

                         

                        Darlys