8 Replies Latest reply on Oct 28, 2008 8:17 AM by Andre Fernando Salvati

    automatically deploy one portlet inside the dashboard on jbo

    Felipe Oliveira Newbie

      Hi there,
      I'm using jboss-portal-2.6.4

      I want to deploy my portlet directly inside my dashboard view.
      I already make my portlet appear in the portal pages but when I try change the <parent-ref> tag





      <if-exists>overwrite</if-exists>

      <parent-ref>dashboard.dashboardpage</parent-ref> --> I don't know how to find this path ?

      I get a error message telling me that the path this path is wrong, so should I make another thing to automatically deploy my portlet inside the dashboard? Is there a way to do that?

      Thanks.


        • 1. Re: automatically deploy one portlet inside the dashboard on
          ameo Novice

          Hi,

          watch the \jboss-portal.sar\conf\data\default-object.xml for

          dashboard portal. Configure the template portal, then your portlets will

          occur in the dashboards.

          ameo

          • 3. Re: automatically deploy one portlet inside the dashboard on
            Felipe Oliveira Newbie

            One more question.
            I would like to create pages on the dashboard for all user that have a specific role.

            Is there an way to do that?


            <if-exists>overwrite</if-exists>
            <parent-ref>dashboard:(role??)</parent-ref>

            <page-name>mypagename</page-name>
            .....



            I want to create a new page on one user dashboard like this:
            <parent-ref>dashboard:user</parent-ref> --> so if i deploy in this way it will create a new page on the user dashboard, How can I do the same but for a role?

            Thanks

            Felipe



            • 4. Re: automatically deploy one portlet inside the dashboard on
              hello All Newbie

              Hi,

              ENV Details:
              JBoss portal - 2.6.5.SP1
              Jboss App Server - 4.2.2.GA

              I have the same requirement of adding my portlet as an alreday existing portlet on dashboard page and removing the default portlets that appear on dashboard - CMSPortlet, JSPPortlet, IdentityUserPortlet. As suggested in this thread, I tried modifying default-object.xml as shown below, but it does not work for me. I cannot see my portlet on the dashboard and can still see the 3 default portlets. Any suggestions ?

              here are the contents of my default-object.xml

              <?xml version="1.0" encoding="UTF-8"?>
              <!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
               ~ JBoss, a division of Red Hat ~
               ~ Copyright 2006, Red Hat Middleware, LLC, and individual ~
               ~ contributors as indicated by the @authors tag. See the ~
               ~ copyright.txt in the distribution for a full listing of ~
               ~ individual contributors. ~
               ~ ~
               ~ This is free software; you can redistribute it and/or modify it ~
               ~ under the terms of the GNU Lesser General Public License as ~
               ~ published by the Free Software Foundation; either version 2.1 of ~
               ~ the License, or (at your option) any later version. ~
               ~ ~
               ~ This software is distributed in the hope that it will be useful, ~
               ~ but WITHOUT ANY WARRANTY; without even the implied warranty of ~
               ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ~
               ~ Lesser General Public License for more details. ~
               ~ ~
               ~ You should have received a copy of the GNU Lesser General Public ~
               ~ License along with this software; if not, write to the Free ~
               ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ~
               ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org. ~
               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
              
              <!DOCTYPE deployments PUBLIC
               "-//JBoss Portal//DTD Portal Object 2.6//EN"
               "http://www.jboss.org/portal/dtd/portal-object_2_6.dtd">
              
              <deployments>
               <deployment>
               <context>
               <context-name/>
               <properties>
               <!--
               | Set the layout for the default portal, see also portal-layouts.xml.
               -->
               <property>
               <name>layout.id</name>
               <value>generic</value>
               </property>
               <!--
               | Set the theme for the default portal, see also portal-themes.xml.
               -->
               <property>
               <name>theme.id</name>
               <value>renaissance</value>
               </property>
               <!--
               | Set the default render set name (used by the render tag in layouts), see also portal-renderSet.xml
               -->
               <property>
               <name>theme.renderSetId</name>
               <value>divRenderer</value>
               </property>
               <!--
               -->
               <property>
               <name>portal.defaultObjectName</name>
               <value>default</value>
               </property>
              
               <!-- Control policy config -->
               <property>
               <name>control.portal.access_denied</name>
               <value>ignore</value>
               </property>
               <property>
               <name>control.portal.unavailable</name>
               <value>ignore</value>
               </property>
               <property>
               <name>control.portal.not_found</name>
               <value>ignore</value>
               </property>
               <property>
               <name>control.portal.internal_error</name>
               <value>jsp</value>
               </property>
               <property>
               <name>control.portal.error</name>
               <value>jsp</value>
               </property>
               <property>
               <name>control.portal.resource_uri</name>
               <value>/WEB-INF/jsp/error/portal.jsp</value>
               </property>
               <property>
               <name>control.page.access_denied</name>
               <value>hide</value>
               </property>
               <property>
               <name>control.page.unavailable</name>
               <value>hide</value>
               </property>
               <property>
               <name>control.page.not_found</name>
               <value>hide</value>
               </property>
               <property>
               <name>control.page.internal_error</name>
               <value>jsp</value>
               </property>
               <property>
               <name>control.page.error</name>
               <value>jsp</value>
               </property>
               <property>
               <name>control.page.resource_uri</name>
               <value>/WEB-INF/jsp/error/page.jsp</value>
               </property>
               </properties>
               </context>
               </deployment>
               <deployment>
               <parent-ref/>
               <if-exists>keep</if-exists>
               <portal>
               <portal-name>default</portal-name>
               <supported-modes>
               <mode>view</mode>
               <mode>edit</mode>
               <mode>help</mode>
               </supported-modes>
               <supported-window-states>
               <window-state>normal</window-state>
               <window-state>minimized</window-state>
               <window-state>maximized</window-state>
               </supported-window-states>
               <security-constraint>
               <policy-permission>
               <action-name>viewrecursive</action-name>
               <action-name>personalizerecursive</action-name>
               <unchecked/>
               </policy-permission>
               </security-constraint>
               <page>
               <page-name>default</page-name>
               <display-name xml:lang="en">Home</display-name>
               <display-name xml:lang="it">Home</display-name>
               <display-name xml:lang="es">Home</display-name>
               <display-name xml:lang="fr">Accueil</display-name>
               <properties>
               <property>
               <name>order</name>
               <value>1</value>
               </property>
               </properties>
               <!--
               <window>
               <window-name>JSPPortletWindow</window-name>
               <instance-ref>JSPPortletInstance</instance-ref>
               <region>left</region>
               <height>0</height>
               </window>
               <window>
               <window-name>CMSWindow</window-name>
               <content>
               <content-type>cms</content-type>
               <content-uri>/default/index.html</content-uri>
               </content>
               <region>center</region>
               <height>1</height>
               </window>
               <window>
               <window-name>IdentityUserPortletWindow</window-name>
               <instance-ref>IdentityUserPortletInstance</instance-ref>
               <region>left</region>
               <height>1</height>
               </window>
               <window>
               <window-name>CurrentUsersPortletWindow</window-name>
               <instance-ref>CurrentUsersPortletInstance</instance-ref>
               <region>left</region>
               <height>2</height>
               </window>
               -->
               <window>
               <window-name>CommissionWebReportPortletWindow</window-name>
               <instance-ref>CommissionWebReportPortletInstance</instance-ref>
               <region>center</region>
               <height>1</height>
               </window>
               </page>
               </portal>
               </deployment>
               <deployment>
               <if-exists>keep</if-exists>
               <context>
               <context-name>dashboard</context-name>
               <properties>
              
               <!--
               | Set the layout for the default portal, see also portal-layouts.xml.
               -->
               <property>
               <name>layout.id</name>
               <value>generic</value>
               </property>
              
               <!--
               | Set the theme for the default portal, see also portal-themes.xml.
               -->
               <property>
               <name>theme.id</name>
               <value>renaissance</value>
               </property>
              
               <!--
               | Set the default render set name (used by the render tag in layouts), see also portal-renderSet.xml
               -->
               <property>
               <name>theme.renderSetId</name>
               <value>divRenderer</value>
               </property>
              
               <!--
               | Set the dnd property
               -->
               <property>
               <name>theme.dyna.dnd_enabled</name>
               <value>true</value>
               </property>
              
               <!--
               | Set the partial refresh property
               -->
               <property>
               <name>theme.dyna.partial_refresh_enabled</name>
               <value>false</value>
               </property>
              
               <!-- Control policy config -->
               <property>
               <name>control.portal.access_denied</name>
               <value>ignore</value>
               </property>
               <property>
               <name>control.portal.unavailable</name>
               <value>ignore</value>
               </property>
               <property>
               <name>control.portal.not_found</name>
               <value>ignore</value>
               </property>
               <property>
               <name>control.portal.internal_error</name>
               <value>jsp</value>
               </property>
               <property>
               <name>control.portal.error</name>
               <value>jsp</value>
               </property>
               <property>
               <name>control.portal.resource_uri</name>
               <value>/WEB-INF/jsp/error/portal.jsp</value>
               </property>
               <property>
               <name>control.page.access_denied</name>
               <value>hide</value>
               </property>
               <property>
               <name>control.page.unavailable</name>
               <value>hide</value>
               </property>
               <property>
               <name>control.page.not_found</name>
               <value>hide</value>
               </property>
               <property>
               <name>control.page.internal_error</name>
               <value>jsp</value>
               </property>
               <property>
               <name>control.page.error</name>
               <value>jsp</value>
               </property>
               <property>
               <name>control.page.resource_uri</name>
               <value>/WEB-INF/jsp/error/page.jsp</value>
               </property>
               </properties>
               </context>
               </deployment>
               <deployment>
               <parent-ref/>
               <if-exists>keep</if-exists>
               <portal>
               <portal-name>template</portal-name>
               <supported-modes>
               <mode>view</mode>
               <mode>edit</mode>
               <mode>help</mode>
               </supported-modes>
               <supported-window-states>
               <window-state>normal</window-state>
               <window-state>minimized</window-state>
               <window-state>maximized</window-state>
               </supported-window-states>
               <page>
               <page-name>default</page-name>
               <display-name xml:lang="en">Home</display-name>
               <display-name xml:lang="it">Home</display-name>
               <display-name xml:lang="es">Home</display-name>
               <display-name xml:lang="fr">Accueil</display-name>
               <properties>
               <property>
               <name>order</name>
               <value>1</value>
               </property>
               </properties>
               <!--
               <window>
               <window-name>JSPPortletWindow</window-name>
               <instance-ref>JSPPortletInstance</instance-ref>
               <region>left</region>
               <height>0</height>
               </window>
               <window>
               <window-name>CMSWindow</window-name>
               <content>
               <content-type>cms</content-type>
               <content-uri>/default/index.html</content-uri>
               </content>
               <region>center</region>
               <height>0</height>
               </window>
              
               <window>
               <window-name>IdentityUserPortletWindow</window-name>
               <instance-ref>IdentityUserPortletInstance</instance-ref>
               <region>left</region>
               <height>1</height>
               </window>
               -->
               <window>
               <window-name>CommissionWebReportPortletWindow</window-name>
               <instance-ref>CommissionWebReportPortletInstance</instance-ref>
               <region>center</region>
               <height>1</height>
               </window>
               </page>
               </portal>
               </deployment>
               <deployment>
               <parent-ref/>
               <if-exists>keep</if-exists>
               <portal>
               <portal-name>admin</portal-name>
               <supported-modes>
               <mode>view</mode>
               <mode>edit</mode>
               <mode>help</mode>
               <mode>admin</mode>
               </supported-modes>
               <supported-window-states>
               <window-state>normal</window-state>
               <window-state>minimized</window-state>
               <window-state>maximized</window-state>
               </supported-window-states>
               <security-constraint>
               <policy-permission>
               <action-name>viewrecursive</action-name>
               <role-name>Admin</role-name>
               </policy-permission>
               </security-constraint>
               <page>
               <page-name>default</page-name>
               <display-name xml:lang="en">Admin</display-name>
               <display-name xml:lang="it">Amministrazione</display-name>
               <display-name xml:lang="es">Administración</display-name>
               <display-name xml:lang="fr">Administration</display-name>
               <window>
               <window-name>AdminPortletWindow</window-name>
               <instance-ref>AdminPortletInstance</instance-ref>
               <region>center</region>
               <height>0</height>
               <properties>
               <property>
               <name>theme.renderSetId</name>
               <value>emptyRenderer</value>
               </property>
               </properties>
               </window>
               <properties>
               <property>
               <name>layout.id</name>
               <value>1column</value>
               </property>
               </properties>
               </page>
               <page>
               <page-name>Members</page-name>
               <display-name xml:lang="en">Members</display-name>
               <display-name xml:lang="it">Membri</display-name>
               <window>
               <window-name>IdentityAdminPortletWindow</window-name>
               <instance-ref>IdentityAdminPortletInstance</instance-ref>
               <region>center</region>
               <height>0</height>
               <properties>
               <property>
               <name>theme.renderSetId</name>
               <value>emptyRenderer</value>
               </property>
               </properties>
               </window>
               <properties>
               <property>
               <name>layout.id</name>
               <value>1column</value>
               </property>
               </properties>
               </page>
               </portal>
               </deployment>
              </deployments>



              Thanks


              • 5. Re: automatically deploy one portlet inside the dashboard on
                hello All Newbie

                Any response/suggestion on this topic will be appreciated.

                • 6. Re: automatically deploy one portlet inside the dashboard on
                  hello All Newbie

                  Anyone have any suggestions on this ?
                  Thanks

                  • 7. Re: automatically deploy one portlet inside the dashboard on
                    Valli Annamalai Newbie

                    Hello,

                    Did you find a solution to your question? I tried modifying default-object.xml as specified and it doesn't work for me either. I still only see the default 3 portlets.

                    Using JBoss portal - 2.6.6

                    Thanks

                    • 8. Re: automatically deploy one portlet inside the dashboard on
                      Andre Fernando Salvati Novice

                      Hi,

                      You should modify your template portal with admin user. After this, create a new user. This user must have your new dashboard configuration. Old users keep the old template configuration (the one when they were created).