View Full Version : Getting Started
mazloumi
12-14-2005, 07:21 AM
Hi,
I hope I am asking my question at the right place:
1. Where and how do I define my own Tabs and are Subtabs supported in Pentaho?
2. How can I or where can I find an example on defining my own portlets that integrate a report I have defined?
3. How can I define two portlets foo and bar where the selection in foo influences what is rendered in bar?
Many thanks. Pentaho is really a great platform.
jdixon
12-14-2005, 10:12 AM
1. To add tabs to the portal pages you need to add entries to the pentho-pages.xml, pentaho-instances.xml, and portlet.xml in the pentaho-demo/jboss/server/default/deploy/pentaho.war/WEB-INF
directory. These are portlet deployment files for JBoss Portal. You can find documentation for these files by clicking here (http://jboss.com/products/jbossportal/docs)
If you are using a different portal the deployment files will be different.
2. For an example of an embedding report content into a portlet see the dashboard page in the current demo. It includes output from a JFreeReport report. This is defined in portlet.xml (EmbeddedReportPortlet) and the report action is in pentaho-demo/pentaho-solutions/samples/portal/jfreereport-reports-test-1.xaction
and the report definition is pentaho-demo/pentaho-solutions/samples/portal/JFreeQuadrantForRegion.xml
there are two report configuration settings that you hve to set in the report definition. They look like this...
<configuration>
<property name="org.jfree.report.modules.output.table.html.BodyFragment">true</property>
<property name="org.jfree.report.modules.output.table.html.ProportionalColumnWidths">true</property>
</configuration>
3. To do this portlet foo needs to use an action URL when the selection is made. Foo's processAction method will be called (or the processPortletAction method if you are subclassing the Pentaho portlets) and it can place something into the users session for the other portlets to use when their doView method (or doPortletView for Pentaho subclassed portlets) is called. See pentaho/server/pentaho/src/org/pentaho/ui/portlet/FilterPanelPortlet.java for an example.
This functionality and these objects are defined by a standard called JSR-168. There are several books about JSR-168 portlets. The one I use is called 'Building Portals with the Java Portlet API' published by Apress.
mazloumi
12-15-2005, 12:35 AM
Thank you for the link. I found more information on how to define pages, portlets, roles and permissions.
Two questions:
- Can I change them (pages, portlets, roles, permissions) in a running system? Like remove a page or portlet or change permissions?
Right now I always restart the server.
- I can see on pentaho.org that a page has subpages has a menu like structure? I would like to define pages and subpages in order to create some kind of site structure. How can I do this?
Post edited by: mazloumi, at: 12/15/2005 06:44
jdixon
12-15-2005, 09:46 PM
1.
Yes you can change some things in a running system. You can change portlets, instances, and pages as long as they are defined in a webapp that is not the jboss-portal.sar Once you have made your changes open /WEB-INF/web.xml in the webapp where you made the changes and save the file. JBoss watches the web.xml file to check for changes, and when it notices the file change it will unload and then reload your webapp. You might also be able to do this thru the JBoss JMX console, I just find it easy to touch the web.xml. You have to be careful because if you have an error in one of the portlet deployment files your portlets will fail to deploy and also fail to undeploy (which means you can't get them to reload even after you have corrected the problem). In this situation you will need to restart the server.
2.
On pentaho.org we are using Mambo which is a PHP-based system. However the menu system used is a Javascript library that is available at this web site (http://www.youngpup.net/2004/transmenus/project). JBoss portal does not support multi-level menus itself but you could integrate transmenu into the portal layout JSP.
mazloumi
12-15-2005, 11:27 PM
James Dixon: thx,
Strange that JBoss doesn't even unload when an error occurs. I will post at JBoss to see if anyone has found a solution for that.
I will try to integrate that. Is there interest at pentaho once it works?
I guess the multi-level menu has to reference several portals right?
I just tried out the menu under Opera. It's not working there correctly. The submenu is always expanded on the top left of the browser instead right below the top-level menu.
Post edited by: mazloumi, at: 12/16/2005 04:44
jdixon
12-16-2005, 06:44 AM
Yeah, its odd that you can't undeploy a portlet that failed to deploy.
Us and JBoss would be interested in the menu integration. Check the JBoss Portal forums to see if they have anything new for menuing.
What version of Opera do you have? I have Opera V7.54 and the menu system works fine on http://www.pentaho.org
We did discover that 3 level menus don't work in a few browsers.
James
mazloumi
12-20-2005, 09:26 AM
dixon: I use opera 8.5
I also posted on jboss and they told me that jboss portal 2.2 has support for subpages. So I guess pentaho uses an older version? How can I find out the version of jboss portals in pentaho and how what do I have to touch to replace it or upgrade to a newer version?
jdixon
12-21-2005, 08:26 PM
We are currently include JBoss Portal V2.0 with our Pre-Congfigured Installation.
We will be moving to version 2.2 next month and our next stable build released should include this version.
If you cannot wait until then I suggest you install the 'JBoss Portal 2.2 + JBoss AS 4.0.3SP1' bundle from JBoss. Here is the url for it.
http://prdownloads.sourceforge.net/jboss/jboss-portal-2.2.0-bundled.zip?download
Once you have installed this follow the instructions in our Advanced Install Guide for how to deploy Pentaho into JBoss.
James
mazloumi
12-22-2005, 07:23 AM
I am stuck getting pentaho run on JBP 2.2. There is no such folder like /server/default/deploy/jboss-hibernate.deployer.
I waas not able to find anything related to hibernate in the directory tree of JBoss portal. I downloaded jboss-portal-2.2.0-bundled.zip which is 79.9 MB large.
Any idea?
jdixon
12-22-2005, 07:26 PM
I am looking into this for you.
James