Hitachi Vantara Pentaho Community Forums
Results 1 to 7 of 7

Thread: How: to Build a Pentaho Portal with the ExtJS library

  1. #1
    Join Date
    Jun 2007
    Posts
    260

    Default How: Build a Pentaho Portal with the ExtJS library

    After a discussion on the ##pentaho forum last week, I undertook to get a "Portal" set up with the Ext Javascript library : http://extjs.com

    I have made minor modifications to the Ext Portal sample to load the HelloWold sample and some reports from the PCI distribution.

    I have attached a file with my changes. There is a readme at the top of the file that explains the steps in detail.

    The included file is almost a drop-in example. with the exception of the /pentaho.war/WEB-INF/web.xml file, which you should not overwrite unless you have not modified it already.

    Please rename the attachment by removing the .txt extension from the file name before uncompressing.

    Regards
    Pradesh Chanderpaul
    Attached Images Attached Images  
    Attached Files Attached Files
    Last edited by crafter; 03-11-2008 at 11:00 AM. Reason: Reloaded attached archive

  2. #2
    Join Date
    Dec 2005
    Posts
    531

    Default

    Hi Pradesh,

    are you sure you have included the right Portal.jsp?

    The one I found has the following code:
    Code:
    <%@ page language="java" 
    	import="org.pentaho.core.system.PentahoSystem,
    			org.pentaho.core.session.IPentahoSession,
    			org.pentaho.core.util.XmlHelper,
    	            	org.pentaho.messages.Messages,
    			org.pentaho.core.util.IUITemplater,
    			org.pentaho.core.util.UIUtil,
    			org.pentaho.messages.util.LocaleHelper,
    			org.pentaho.util.IVersionHelper,
    			org.pentaho.ui.component.INavigationComponent,
        			org.pentaho.ui.component.NavigationComponentFactory,
        			org.pentaho.core.ui.SimpleUrlFactory,
    			org.pentaho.core.solution.SimpleParameterProvider,
    			org.dom4j.*,
    			org.pentaho.core.solution.ActionResource,
    			org.pentaho.core.solution.IActionResource,
    			java.io.*,
    			java.util.*" %><%
    
    /*
     * Copyright 2006 Pentaho Corporation.  All rights reserved. 
     * This software was developed by Pentaho Corporation and is provided under the terms 
     * of the Mozilla Public License, Version 1.1, or any later version. You may not use 
     * this file except in compliance with the license. If you need a copy of the license, 
     * please go to http://www.mozilla.org/MPL/MPL-1.1.txt. The Original Code is the Pentaho 
     * BI Platform.  The Initial Developer is Pentaho Corporation.
     *
     * Software distributed under the Mozilla Public License is distributed on an "AS IS" 
     * basis, WITHOUT WARRANTY OF ANY KIND, either express or  implied. Please refer to 
     * the license for the specific language governing your rights and limitations.
     *
     * @created Jul 23, 2005 
     * @author James Dixon
     * 
     */
     
    	response.setCharacterEncoding(LocaleHelper.getSystemEncoding());
     	String baseUrl = PentahoSystem.getApplicationContext().getBaseUrl();
     
    	String path = request.getContextPath();
    
    	IPentahoSession userSession = UIUtil.getPentahoSession( request );
    
    	StringBuffer sb = new StringBuffer();
      IVersionHelper versionHelper = PentahoSystem.getVersionHelper(null);
    	String header = Messages.getString( "UI.USER_ABOUT_TITLE", versionHelper.getVersionInformation() );
    
    	String intro = "";
    	String footer = "";
    	IUITemplater templater = PentahoSystem.getUITemplater( userSession );
    	if( templater != null ) {
    
    		// Load a template for this web page
    		String template = null;
      		try {
    	   		ActionResource resource = new ActionResource( "", IActionResource.SOLUTION_FILE_RESOURCE, "text/xml", "system/custom/template-dialog.html" ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
        			template = PentahoSystem.getSolutionRepository(userSession).getResourceAsString( resource );
        		} catch (Throwable t) {
        		}
    
    		// Break the template into header and footer sections
    		String sections[] = templater.breakTemplateString( template, header, userSession ); //$NON-NLS-1$ //$NON-NLS-2$
    		if( sections != null && sections.length > 0 ) {
    			intro = sections[0];
    		}
    		if( sections != null && sections.length > 1 ) {
    			footer = sections[1];
    		}
    	} else {
    		intro = Messages.getString( "UI.ERROR_0002_BAD_TEMPLATE_OBJECT" );
    	}
    
    %>
    
    <%= intro %>
    
    	<table class='content_table' border='0' cellpadding='0' cellspacing='0' height='100%'>
    		<tr>
    			<td height='100%' class='contentcell_half_left'>
    
    				<%= Messages.getString( "UI.USER_ABOUT_TEXT" ) %>
    				<a href='javascript:void(0);' onclick='javascript:window.open( "http://community.pentaho.org/contributors/" );'><%=Messages.getString( "UI.USER_SPECIAL_THANKS" )%></a>
    			</td>
    		</tr>
    	</table>
    
    <%= footer %>
    Thanks,
    Ingo

  3. #3
    Join Date
    Jun 2007
    Posts
    260

    Default

    Ingo

    You are right. That is not the correct one. (The one you show is just a copy of About.js)

    I've uploaded the correct one now. Sorry for that.

    Regards
    Pradesh

  4. #4
    Join Date
    Jan 2008
    Posts
    14

    Default JPiviot Error

    Hello Friends

    As I m getting problem while running report Jpiviot error server is Busy please how to handle this problem

    SANJEEWAN

  5. #5
    Join Date
    Jun 2007
    Posts
    260

    Default

    SANJEEWAN

    I think your problem is not relate to the Ext portal.

    You had to enter a URL to obtain the portlet displayed in the portlet panel. Check if you have sucesss if you type the URL in its own browser windwo.

  6. #6

    Default

    looks cool crafter, I'll have to take a proper look at the guts when I get 10 seconds.

    Tom
    This is a signature.... everyone gets it.

    Join the Unofficial Pentaho IRC channel on freenode.
    Server: chat.freenode.net Channel: ##pentaho

    Please try and make an effort and search the wiki and forums before posting!
    Checkout the Saiku, the future of Open Source Interactive OLAP(http://analytical-labs.com)

    http://mattlittle.files.wordpress.co...-bananaman.jpg

  7. #7
    Join Date
    Apr 2008
    Posts
    1

    Default ExtJS

    Does anyone get this problem when I have more than 1 portlets using ExtJS on the same portal page, none of the portlet shows up. Is there something I needed to do explicitly when using ExtJS in more then one place?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.