3 Replies Latest reply on Jul 28, 2011 7:36 AM by Antoine Herzog

    How to configure a default dashboard page for every user ?

    Olivier Picciotto Newbie

      I would like to configure a default dashboard page for every user in GateIn. How can we do this ?. I heard about a default-object.xml file but where is this file located in the  gatein distribution?

       

      Thx

        • 1. Re: How to configure a default dashboard page for every user ?
          Marek Posolda Apprentice

          Hi,

           

          GateIn is using pages where you can place portlets and applications and it also uses navigations, where you need to add some pages.

           

          Template for user pages and navigations are in directory server/default/deploy/gatein.ear/02portal.war/WEB-INF/conf/portal/user/template/user and in files pages.xml and navigations.xml.

           

          For inspiration, you can look at existing pages and navigation configurations in other files inside server/default/deploy/gatein.ear/02portal.war/WEB-INF/conf/portal/ directory. All default gatein pages and navigations are placed here. Some more info about it is also in GateIn reference guide.

           

          Hope this helps,

          Marek

          • 2. Re: How to configure a default dashboard page for every user ?
            Nadia Pérez Newbie

            Hi,

             

            I have found the directory for the users templates and got these 3 files : user.xml, pages.xml and navigation.xml.

             

            In both pages and navigation files I don't see anyway to add a new dashbord template.

            pages.xml :

            <page-set

                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_objects_1_0 http://www.gatein.org/xml/ns/gatein_objects_1_0"

                xmlns="http://www.gatein.org/xml/ns/gatein_objects_1_0">

            </page-set>

             

            navigation.xml:

            <node-navigation>

                <priority>3</priority>

             

              <page-nodes>

              </page-nodes>

            </node-navigation>

             

            Eventually there's something to change on the users.xml file but the reference does not mention it.

            Any advice on how I can set a dashboard page as a default page for every users?

             

            Regards,

            Nadia

            • 3. Re: How to configure a default dashboard page for every user ?
              Antoine Herzog Master

              For defining a page that is a dashboard, a sample is in :

              GateIn-3.1.0-GA/examples/portal/war/target/sample-portal/WEB-INF/conf/sample-portal/portal/user/root/navigation.xml

               

              it is :

               

              
              <page-nodes>
              
              
              
              
              <node>
              
              
              
              
              
              
              <uri>sample-user</uri>
              
              
              
              
              
              
              <name>sample-user</name>
              
              
              
              
              
              
              <label>Sample-Portal Page User</label>
              
              
              
              
              <page-reference>user::root::sampledashboard</page-reference>
              
              
              </node>
              </page-nodes>
              
              
              

               

              In GateIn-3.1.0-GA/examples/portal/war/target/sample-portal/WEB-INF/conf/sample-portal/portal/user/root/page.xml

              you have the page definition.

               

               

              <page>
                  <name>sampledashboard</name>
                  <title>Sample Dashboard</title>
                  <access-permissions>*:/platform/users</access-permissions>
                  <edit-permission>*:/platform/administrators</edit-permission>
                  <portlet-application>
                    <portlet>
                      <application-ref>dashboard</application-ref>
                      <portlet-ref>DashboardPortlet</portlet-ref>
                    </portlet>
                    <title>Dashboard</title>
                    <access-permissions>*:/platform/users</access-permissions>
                    <show-info-bar>false</show-info-bar>
                  </portlet-application>
                </page>
              

               

              You can search and look at the DashboardPortlet in the dashboard WebApp, to see how it is done.

               

              To override the DashBoard, you can make your custom dashboard WebApp, and remove the default one from GateIn, and add your custom one instead.

              You can rewritte more or less of it, depending on what you need.

              I guess that you may keep the DashboardPortlet, but only give a different configuration of the DashBoard (I never did this, but I guess it is the lighter way).

               

              To set your custom dashboard WebApp, instead of the default one, look at the Portal Sample and Portal Extensions sample, and in the doc about the Extensions.

              see also the PortalContainer configuration file for that.

              It is in the Config War of the Portal Ear, or the Portal Extension Ear.

              usually in : /conf/configuration.xml

               

              May be it is more reliable to first replace the "dashboard" WebApp, see if all works fine, then may be rename it, and move it into an Extension Ear.

              I don't know all the impact that will be, if it works fine if you change the name of the WebApp, and Page name etc...

              You will probably have to check every thing in the Users, Groups, etc... definitions, to provide your DashBoard instead of the default one.

               

              Hope it helps,

              Antoine

              JBoss Portal and GateIn (JSR-286), JSF, Richfaces, J2EE, Drools, BRMS.

              http://www.sysemo.com/