You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by mo...@apache.org on 2003/01/02 20:19:55 UTC

cvs commit: jakarta-jetspeed/webapp/WEB-INF/templates/jsp/portlets/html StockQuotes.jsp

morciuch    2003/01/02 11:19:55

  Modified:    webapp/WEB-INF/conf demo-portlets.xreg
  Added:       src/java/org/apache/jetspeed/modules/actions/portlets
                        JspStockQuoteAction.java
               webapp/WEB-INF/templates/jsp/portlets/html StockQuotes.jsp
  Log:
  Added a jsp-based stock quote portlet demo utilizing portlet action and action events
  
  Revision  Changes    Path
  1.1                  jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/JspStockQuoteAction.java
  
  Index: JspStockQuoteAction.java
  ===================================================================
  /* ====================================================================
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 2000-2001 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution,
   *    if any, must include the following acknowledgment:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowledgment may appear in the software itself,
   *    if and wherever such third-party acknowledgments normally appear.
   *
   * 4. The names "Apache" and "Apache Software Foundation" and
   *     "Apache Jetspeed" must not be used to endorse or promote products
   *    derived from this software without prior written permission. For
   *    written permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache" or
   *    "Apache Jetspeed", nor may "Apache" appear in their name, without
   *    prior written permission of the Apache Software Foundation.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   */
  
  package org.apache.jetspeed.modules.actions.portlets;
  
  // Turbine stuff
  import org.apache.turbine.util.Log;
  import org.apache.turbine.util.RunData;
  import org.apache.turbine.services.TurbineServices;
  import org.apache.turbine.util.Comparable;
  import org.apache.turbine.util.QuickSort;
  
  // Jetspeed stuff
  import org.apache.jetspeed.portal.Portlet;
  import org.apache.jetspeed.modules.actions.portlets.JspPortletAction;
  import org.apache.jetspeed.webservices.finance.stockmarket.StockQuoteService;
  import org.apache.jetspeed.webservices.finance.stockmarket.StockQuote;
  import org.apache.jetspeed.util.PortletConfigState;
  import org.apache.jetspeed.util.PortletSessionState;
  import org.apache.jetspeed.util.StringUtils;
  
  /**
   * This action sets up the template context for retrieving stock quotes.
   *
   * @author <a href="mailto:morciuch@apache.org">Mark Orciuch</a>
   * @version $Id: JspStockQuoteAction.java,v 1.1 2003/01/02 19:19:55 morciuch Exp $ 
   */
  
  public class JspStockQuoteAction extends JspPortletAction implements Comparable
  {
      private static final String SYMBOLS = "symbols";
      private static final String COLUMNS = "columns";
      private static final String QUOTES = "quotes";
      private static final String SORT = "sort";
      private static final String SELECTED_COLUMNS = "selected-columns";
      private static final String[] ALL_COLUMNS = {"Symbol","Price","Change","Volume"};
      private String sort = null;
  
      /**
       * Build the normal state content for this portlet.
       *
       * @param portlet The jsp-based portlet that is being built.
       * @param rundata The turbine rundata context for this request.
       */
      protected void buildNormalContext(Portlet portlet, RunData rundata)
      {
  
          // We always fetch the most current quotes so might as well call refresh from here
          this.doRefresh(rundata, portlet);
      }
  
      /**
       * Sort the quotes.
       *
       * @param portlet The jsp-based portlet that is being built.
       * @param rundata The turbine rundata context for this request.
       */
      public void doSort(RunData rundata, Portlet portlet)
      {
          // We always fetch the most current quotes so might as well call refresh from here
          this.doRefresh(rundata, portlet);
          Log.info("JspStockQuoteAction: sorting...");
      }
  
      /**
       * Refresh the portlet content.
       *
       * @param portlet The jsp-based portlet that is being built.
       * @param rundata The turbine rundata context for this request.
       */
      public void doRefresh(RunData rundata, Portlet portlet)
      {
          try
          {
              // Get reference to stock quote web service
              StockQuoteService service = (StockQuoteService) TurbineServices.getInstance().
                  getService(StockQuoteService.SERVICE_NAME);
  
              // Retrieve portlet parameters
              String symbols = (String) PortletSessionState.getAttributeWithFallback(portlet, rundata, SYMBOLS);
  
              this.sort = (String) PortletSessionState.getAttributeWithFallback(portlet, rundata, SORT);
              if (this.sort != null)
              {
                  PortletSessionState.setAttribute(portlet, rundata, SORT, sort);
                  rundata.getRequest().setAttribute(SORT, sort);
              }
  
              String columns = PortletConfigState.getParameter(portlet, rundata, COLUMNS, 
                                                               StringUtils.arrayToString(ALL_COLUMNS, ","));
              String[] selectedColumnsArray = StringUtils.stringToArray(columns, ",");
  
  
              // Request stock quote(s) from the stock quote web service
              String[] symbolArray = StringUtils.stringToArray(symbols, ",");
              StockQuote[] quotes = service.fullQuotes(symbolArray);
  
              // Sort the entries
              if (this.sort != null)
              {
                  QuickSort.quickSort(quotes, 0, quotes.length - 1, this);
                  rundata.getRequest().setAttribute(SORT, this.sort);
              }
  
              // Place appropriate objects in jsp context
              rundata.getRequest().setAttribute(QUOTES, quotes);
              rundata.getRequest().setAttribute(COLUMNS, selectedColumnsArray);
              rundata.getRequest().setAttribute(SELECTED_COLUMNS, columns);
  
              Log.info("JspStockQuoteAction: refreshing...");
          }
          catch (Exception e)
          {
              Log.error(e);
          }
      }
  
      /**
       * Compare to another <code>StockQuote</code>.  Used by the
       * <code>QuickSort</code> class to determine sort order.
       * 
       * @param entry1 The first <code>StockQuoteEntry</code> object.
       * @param entry2 The second <code>StockQuoteEntry</code> object.
       * @return An <code>int</code> indicating the result of the comparison.
       */
      public int compare(Object entry1, Object entry2)
      {
          if (this.sort.equalsIgnoreCase("price"))
          {
              Float entrycol1 = new Float(((StockQuote) entry1).getPrice());
              Float entrycol2 = new Float(((StockQuote) entry2).getPrice());
              return entrycol1.compareTo(entrycol2);
          }
          else if (this.sort.equalsIgnoreCase("symbol"))
          {
              String entrycol1 = ((StockQuote) entry1).getSymbol();
              String entrycol2 = ((StockQuote) entry2).getSymbol();
              return entrycol1.compareTo(entrycol2);
          }
          else if (this.sort.equalsIgnoreCase("change"))
          {
              Double entrycol1 = new Double(((StockQuote) entry1).getChange());
              Double entrycol2 = new Double(((StockQuote) entry2).getChange());
              return entrycol1.compareTo(entrycol2);
          }
          else
          {
              Long entrycol1 = new Long(((StockQuote) entry1).getVolume());
              Long entrycol2 = new Long(((StockQuote) entry2).getVolume());
              return entrycol1.compareTo(entrycol2);
          }
  
      }
  
  }
  
  
  
  
  1.29      +425 -387  jakarta-jetspeed/webapp/WEB-INF/conf/demo-portlets.xreg
  
  Index: demo-portlets.xreg
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/webapp/WEB-INF/conf/demo-portlets.xreg,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- demo-portlets.xreg	18 Dec 2002 07:06:10 -0000	1.28
  +++ demo-portlets.xreg	2 Jan 2003 19:19:55 -0000	1.29
  @@ -1,398 +1,436 @@
   <?xml version="1.0" encoding="UTF-8"?>
   <registry>
  -    <portlet-entry name="HelloVelocityCached" hidden="false" type="ref" parent="CustomizerVelocity" application="false">
  -        <meta-info>
  -            <title>HelloVelocityCached</title>
  -            <description>Simple Cached Velocity Portlet Example</description>
  -        </meta-info>
  -        <parameter name="template" value="hello" hidden="true"/>
  -        <parameter name="cache-period-milliseconds" value="60000" hidden="false"/>
  -        <parameter name="action" value="portlets.HelloAction" hidden="true"/>
  -        <parameter name="text" value="Hello - only changes occasionally due to content caching" hidden="false"/>
  -        <media-type ref="html"/>
  -        <category>demo</category>
  -        <category>velocity.demo</category>
  -    </portlet-entry>
  -    <portlet-entry name="HelloVelocity" hidden="false" type="ref" parent="CustomizerVelocity" application="false">
  -        <meta-info>
  -            <title>HelloVelocity</title>
  -            <description>Simple Velocity Portlet Example</description>
  -        </meta-info>
  -        <parameter name="template" value="hello" hidden="true"/>
  -        <parameter name="action" value="portlets.HelloAction" hidden="true"/>
  -        <parameter name="text" value="Hello World in Velocity" hidden="false"/>
  -        <media-type ref="html"/>
  -        <category>demo</category>
  -        <category>velocity.demo</category>
  -    </portlet-entry>
  -    <portlet-entry name="HelloJSP" hidden="false" type="ref" parent="JSP" application="false">
  -        <meta-info>
  -            <title>HelloJSP</title>
  -            <description>Simple JSP Portlet Example</description>
  -        </meta-info>
  -        <parameter name="template" value="hello.jsp" hidden="true"/>
  -        <media-type ref="html"/>
  -        <category>demo</category>
  -        <category>jsp.demo</category>
  -    </portlet-entry>
  -    <portlet-entry name="JSP1_1andJetspeedTagLib" hidden="false" type="ref" parent="JSP" application="false">
  -        <meta-info>
  -            <title>JSP1_1andJetspeedTagLib</title>
  -            <description>
  +	<portlet-entry name="HelloVelocityCached" hidden="false" type="ref" parent="CustomizerVelocity" application="false">
  +		<meta-info>
  +			<title>HelloVelocityCached</title>
  +			<description>Simple Cached Velocity Portlet Example</description>
  +		</meta-info>
  +		<parameter name="template" value="hello" hidden="true"/>
  +		<parameter name="cache-period-milliseconds" value="60000" hidden="false"/>
  +		<parameter name="action" value="portlets.HelloAction" hidden="true"/>
  +		<parameter name="text" value="Hello - only changes occasionally due to content caching" hidden="false"/>
  +		<media-type ref="html"/>
  +		<category>demo</category>
  +		<category>velocity.demo</category>
  +	</portlet-entry>
  +	<portlet-entry name="HelloVelocity" hidden="false" type="ref" parent="CustomizerVelocity" application="false">
  +		<meta-info>
  +			<title>HelloVelocity</title>
  +			<description>Simple Velocity Portlet Example</description>
  +		</meta-info>
  +		<parameter name="template" value="hello" hidden="true"/>
  +		<parameter name="action" value="portlets.HelloAction" hidden="true"/>
  +		<parameter name="text" value="Hello World in Velocity" hidden="false"/>
  +		<media-type ref="html"/>
  +		<category>demo</category>
  +		<category>velocity.demo</category>
  +	</portlet-entry>
  +	<portlet-entry name="HelloJSP" hidden="false" type="ref" parent="JSP" application="false">
  +		<meta-info>
  +			<title>HelloJSP</title>
  +			<description>Simple JSP Portlet Example</description>
  +		</meta-info>
  +		<parameter name="template" value="hello.jsp" hidden="true"/>
  +		<media-type ref="html"/>
  +		<category>demo</category>
  +		<category>jsp.demo</category>
  +	</portlet-entry>
  +	<portlet-entry name="JSP1_1andJetspeedTagLib" hidden="false" type="ref" parent="JSP" application="false">
  +		<meta-info>
  +			<title>JSP1_1andJetspeedTagLib</title>
  +			<description>
                 JSP Portlet Example that displays data from the Jetspeed
                 Tag Libaray and Java Servlet v1.2 request class.  Requires a
                 Tomcat v3.x or a JSP 1.1 servlet engine.
               </description>
  -        </meta-info>
  -        <parameter name="template" value="JSP1_1andJetspeedTagLib.jsp" hidden="true"/>
  -        <media-type ref="html"/>
  -        <category>demo</category>
  -        <category>jsp.demo</category>
  -    </portlet-entry>
  -    <portlet-entry name="JSP1_2andJetspeedTagLib" hidden="false" type="ref" parent="JSP" application="false">
  -        <meta-info>
  -            <title>JSP1_2andJetspeedTagLib</title>
  -            <description>
  +		</meta-info>
  +		<parameter name="template" value="JSP1_1andJetspeedTagLib.jsp" hidden="true"/>
  +		<media-type ref="html"/>
  +		<category>demo</category>
  +		<category>jsp.demo</category>
  +	</portlet-entry>
  +	<portlet-entry name="JSP1_2andJetspeedTagLib" hidden="false" type="ref" parent="JSP" application="false">
  +		<meta-info>
  +			<title>JSP1_2andJetspeedTagLib</title>
  +			<description>
                 JSP Portlet Example that displays data from the Jetspeed
                 Tag Libaray and Java Servlet v1.2 request class.  Requires a
                 Tomcat v4.x or a JSP 1.2 servlet engine.
               </description>
  -        </meta-info>
  -        <parameter name="template" value="JSP1_2andJetspeedTagLib.jsp" hidden="true"/>
  -        <media-type ref="html"/>
  -        <category>demo</category>
  -        <category>jsp.demo</category>
  -    </portlet-entry>
  -    <portlet-entry name="jslink_examples" hidden="false" type="ref" parent="Velocity" application="false">
  -        <meta-info>
  -            <title>JSLINK Examples</title>
  -            <description>$jslink examples</description>
  -        </meta-info>
  -        <parameter name="template" value="Tool_jslink_examples" hidden="true"/>
  -        <media-type ref="html"/>
  -        <category>demo</category>
  -        <category>velocity.demo</category>
  -    </portlet-entry>
  -    <portlet-entry name="Search" hidden="false" type="ref" parent="HTML" application="false">
  -        <meta-info>
  -            <title>Search</title>
  -            <description>Search the Internet</description>
  -        </meta-info>
  -        <url>/search/index.html</url>
  -        <category>search</category>
  -        <category>html</category>
  -    </portlet-entry>
  -    <portlet-entry name="Welcome" hidden="false" type="ref" parent="HTML" application="false">
  -        <meta-info>
  -            <title>Welcome</title>
  -        </meta-info>
  -        <url>/welcome.html</url>
  -        <category>demo</category>
  -        <category>html.demo</category>
  -    </portlet-entry>
  -    <portlet-entry name="LoggedInWelcome" hidden="false" type="ref" parent="HTML" application="false">
  -        <security-ref parent="user-view_admin-all"/>
  -        <meta-info>
  -            <title>Welcome to Logged in user</title>
  -            <description>Example of a portlet with not Titlebar</description>
  -        </meta-info>
  -        <parameter name="_showtitlebar" value="false" hidden="false"/>
  -        <url>/LoggedInWelcome.html</url>
  -        <category>demo</category>
  -        <category>html.demo</category>
  -    </portlet-entry>
  -    <portlet-entry name="XMLHack" hidden="false" type="ref" parent="RSS" application="false">
  -        <meta-info>
  -            <title>XMLHack</title>
  -        </meta-info>
  -        <url>http://www.xmlhack.com/rss.php</url>
  -        <category>news.software.opensource</category>
  -    </portlet-entry>
  -    <portlet-entry name="Apacheweek" hidden="false" type="ref" parent="RSS" application="false">
  -        <meta-info>
  -            <title>Apacheweek</title>
  -        </meta-info>
  -        <url>http://www.apacheweek.com/issues/apacheweek-headlines.xml</url>
  -        <category>news.software.opensource</category>
  -    </portlet-entry>
  -    <portlet-entry name="Mozilla" hidden="false" type="ref" parent="RSS" application="false">
  -        <meta-info>
  -            <title>Mozilla</title>
  -        </meta-info>
  -        <parameter name="itemdisplayed" value="10" hidden="false"/>
  -        <url>http://www.mozilla.org/news.rdf</url>
  -        <category>news.software.opensource</category>
  -    </portlet-entry>
  -    <portlet-entry name="Jetspeed" hidden="false" type="ref" parent="RSS" application="false">
  -        <parameter name="openinpopup" value="true" hidden="false"/>
  -        <url>/rss/Jetspeed.rss</url>
  -        <category>news.software.opensource</category>
  -        <meta-info>
  -            <title>Jetspeed Documentation</title>
  -            <description>Jetspeed Documentation Portlet</description>
  -        </meta-info>
  -    </portlet-entry>
  -    <portlet-entry name="JavaWeb" hidden="false" type="ref" parent="WebPagePortlet" application="false">
  -        <meta-info>
  -            <title>JavaSoft</title>
  -            <description>JavaSoft</description>
  -        </meta-info>
  -        <parameter name="dont_remove_applet" value="yes" hidden="false"/>
  -        <url>http://java.sun.com/</url>
  -        <category>sites.companies.sun</category>
  -    </portlet-entry>
  -    <portlet-entry type="ref" parent="Velocity" name="StockQuote" application="false" hidden="false">
  -        <meta-info>
  -            <title>Stock Portfolio</title>
  -            <description>Stock Portfolio Portlet</description>
  -        </meta-info>
  -        <parameter name="template" value="stock-quote" hidden="true"/>
  -        <parameter name="action" value="portlets.StockQuoteAction" hidden="true"/>
  -        <parameter name="columns" value="Symbols,Price,Change,Volume" type="style" hidden="false" cachedOnName="true" cachedOnValue="true">
  -            <meta-info>
  -                <title>Columns</title>
  -                <description>Columns to display</description>
  -            </meta-info>
  -        </parameter>
  -        <parameter name="columns.style.items" value="Symbol,Price,Change,Volume" hidden="true" cachedOnName="true" cachedOnValue="true"/>
  -        <parameter name="columns.style.layout" value="$eastwest" hidden="true" cachedOnName="true" cachedOnValue="true"/>
  -        <parameter name="columns.style" value="CheckBoxGroup" hidden="true" cachedOnName="true" cachedOnValue="true"/>
  -        <parameter name="symbols" value="MSFT,IBM,ORCL,SUNW" type="style" hidden="false" cachedOnName="true" cachedOnValue="true">
  -            <meta-info>
  -                <title>Symbols</title>
  -                <description>List of comma-separated stock symbols</description>
  -            </meta-info>
  -        </parameter>
  -        <parameter name="symbols.style" value="TextArea" hidden="true" cachedOnName="true" cachedOnValue="true"/>
  -        <media-type ref="html"/>
  -        <media-type ref="wml"/>
  -        <category>web services</category>
  -        <category>finance.stocks</category>
  -    </portlet-entry>
  -    <portlet-entry name="myLinks" hidden="false" type="ref" parent="LinkPortlet" application="false">
  -        <meta-info>
  -            <title>My Bookmarks</title>
  -            <description>Insert your personal links!</description>
  -        </meta-info>
  -        <parameter name="image" value="contact.gif" hidden="true"/>
  -        <parameter name="link" value="http://www.siemens.de" hidden="true"/>
  -        <parameter name="anchor" value="Siemens germany" hidden="true"/>
  -        <parameter name="description" value="Visit our company home site" hidden="true"/>
  -        <parameter name="image1" value="" hidden="false"/>
  -        <parameter name="link1" value="" hidden="false"/>
  -        <parameter name="anchor1" value="" hidden="false"/>
  -        <parameter name="description1" value="" hidden="true"/>
  -        <parameter name="image2" value="" hidden="false"/>
  -        <parameter name="link2" value="" hidden="false"/>
  -        <parameter name="anchor2" value="" hidden="false"/>
  -        <parameter name="description2" value="" hidden="true"/>
  -        <parameter name="image3" value="" hidden="false"/>
  -        <parameter name="link3" value="" hidden="false"/>
  -        <parameter name="anchor3" value="" hidden="false"/>
  -        <parameter name="description3" value="" hidden="true"/>
  -        <parameter name="image4" value="" hidden="false"/>
  -        <parameter name="link4" value="" hidden="false"/>
  -        <parameter name="anchor4" value="" hidden="false"/>
  -        <parameter name="description4" value="" hidden="true"/>
  -        <media-type ref="html"/>
  -        <category>bookmarks</category>
  -    </portlet-entry>
  -    <portlet-entry name="JetspeedFramed" hidden="false" type="ref" parent="IFramePortlet" application="false">
  -        <meta-info>
  -            <title>Jetspeed Framed</title>
  -            <description>Navigate SomeSite within an IFRAME</description>
  -        </meta-info>
  -        <parameter name="source" value="http://jakarta.apache.org/jetspeed" hidden="false"/>
  -        <media-type ref="html"/>
  -        <category>frames</category>
  -    </portlet-entry>
  -    <portlet-entry name="AggregateTest" type="ref" parent="AggregatePortlet">
  -        <meta-info>
  -            <title>Portlet Aggregation Test</title>
  -            <description>Portlet Aggregation test</description>
  -        </meta-info>
  -        <parameter name="path" value="group/apache/page/news/media-type/html"/>
  -        <media-type ref="html"/>
  -        <category>psml.including</category>
  -    </portlet-entry>
  -    <portlet-entry name="DatabaseBrowserTest" hidden="false" type="ref" parent="DatabaseBrowserPortlet" application="false">
  -        <meta-info>
  -            <title>DatabaseBrowserTest</title>
  -            <description>Simple Test Database Browser Portlet Example</description>
  -        </meta-info>
  -        <parameter name="template" value="database-browser-portlet" hidden="true"/>
  -        <parameter name="customizeTemplate" value="database-browser-customize" hidden="true"/>
  -        <parameter name="action" value="portlets.browser.DatabaseBrowserAction" hidden="true"/>
  -        <parameter name="sql" value="select * from coffees" hidden="false"/>
  -        <!-- to use an alternate torque pool, set this parameter -->
  -        <!-- parameter name="poolname" value="otherpool" hidden="true"/-->
  -        <parameter name="windowSize" value="5" hidden="false"/>
  -        <media-type ref="html"/>
  -        <category>database</category>
  -    </portlet-entry>
  -    <portlet-entry name="InstanceExample" hidden="false" type="instance" application="false">
  -        <classname>org.apache.jetspeed.portal.portlets.BogusPortlet</classname>
  -        <media-type ref="html"/>
  -        <meta-info>
  -            <title>Instance Attribute Example</title>
  -        </meta-info>
  -        <category>persistence</category>
  -    </portlet-entry>
  -    <portlet-entry name="SecurityExample" hidden="false" type="ref" parent="Velocity" application="false">
  -        <security-ref parent="user-view_admin-all"/>
  -        <meta-info>
  -            <title>SecurityExample</title>
  -            <description>Simple Security Example</description>
  -        </meta-info>
  -        <parameter name="template" value="SecurityExample" hidden="true"/>
  -        <media-type ref="html"/>
  -        <category>demo</category>
  -        <category>velocity.demo</category>
  -    </portlet-entry>
  -    <portlet-entry name="BloomingtonWeather" hidden="false" type="ref" parent="CustomizerVelocity" application="false">
  -        <meta-info>
  -            <title>Weather - Bloomington,IN</title>
  -            <description>Current weather conditions</description>
  -        </meta-info>
  -        <parameter name="template" value="weather" hidden="true"/>
  -        <parameter name="customizeTemplate" value="weather-customize" hidden="true"/>
  -        <parameter name="action" value="portlets.WeatherAction" hidden="true"/>
  -        <parameter name="weather_city" value="Bloomington" hidden="false"/>
  -        <parameter name="weather_state" value="IN" hidden="false"/>
  -        <parameter name="weather_style" value="infobox" hidden="false"/>
  -        <media-type ref="html"/>
  -        <category>weather</category>
  -    </portlet-entry>
  -    <portlet-entry name="IstanbulWeather" hidden="false" type="ref" parent="CustomizerVelocity" application="false">
  -        <meta-info>
  -            <title>Weather - Istanbul,Turkey</title>
  -            <description>Current weather conditions</description>
  -        </meta-info>
  -        <parameter name="template" value="weather" hidden="true"/>
  -        <parameter name="customizeTemplate" value="weather-customize" hidden="true"/>
  -        <parameter name="action" value="portlets.WeatherAction" hidden="true"/>
  -        <parameter name="weather_station" value="17060" hidden="false"/>
  -        <parameter name="weather_style" value="infobox" hidden="false"/>
  -        <parameter name="_showtitlebar" value="false" hidden="true"/>
  -        <media-type ref="html"/>
  -        <category>weather</category>
  -    </portlet-entry>
  -    <portlet-entry name="parameter_demo" hidden="false" type="ref" parent="JSP" application="false">
  -        <meta-info>
  -            <title>Parameter Styles Demo</title>
  -            <description>Examples of defining parameter styles</description>
  -        </meta-info>
  -        <parameter name="template" value="parameter-demo-portlet.jsp" hidden="true" cachedOnName="true" cachedOnValue="true"/>
  -        <parameter name="sort" value="Symbol" type="style" hidden="false" cachedOnName="true" cachedOnValue="true">
  -            <meta-info>
  -                <title>Sort</title>
  -                <description>Column to sort by</description>
  -            </meta-info>
  -        </parameter>
  -        <parameter name="sort.style" value="ListBox" hidden="true" cachedOnName="true" cachedOnValue="true"/>
  -        <parameter name="sort.style.items" value="Symbol,Volume,PChange" hidden="true" cachedOnName="true" cachedOnValue="true"/>
  -        <parameter name="columns" value="Symbol,Quote,Date,Time,Change,PChange,Open,High,Low,Volume" type="style" hidden="false" cachedOnName="true" cachedOnValue="true">
  -            <meta-info>
  -                <title>Columns</title>
  -                <description>Columns to display</description>
  -            </meta-info>
  -        </parameter>
  -        <parameter name="columns.style.items" value="Symbol,Quote,Date,Time,Change,PChange,Open,High,Low,Volume" hidden="true" cachedOnName="true" cachedOnValue="true"/>
  -        <parameter name="columns.style.layout" value="$eastwest" hidden="true" cachedOnName="true" cachedOnValue="true"/>
  -        <parameter name="columns.style" value="CheckBoxGroup" hidden="true" cachedOnName="true" cachedOnValue="true"/>
  -        <parameter name="symbols" value="MSFT,ORCL,SUNW,EMC,INTU" type="style" hidden="false" cachedOnName="true" cachedOnValue="true">
  -            <meta-info>
  -                <title>Symbols</title>
  -                <description>List of comma-separated stock symbols</description>
  -            </meta-info>
  -        </parameter>
  -        <parameter name="symbols.style" value="TextArea" hidden="true" cachedOnName="true" cachedOnValue="true"/>
  -        <parameter name="date1" value="Jul-14-1789" type="style" hidden="false" cachedOnName="true" cachedOnValue="true">
  -            <meta-info>
  -                <title>Bastille Day</title>
  -                <description>Date with popup calendar. Format pattern: mmm-dd-yyyy</description>
  -            </meta-info>
  -        </parameter>
  -        <parameter name="date1.style" value="PopupCalendar" hidden="true" cachedOnName="true" cachedOnValue="true"/>
  -        <parameter name="date1.style.format" value="mmm-d-yyyy" hidden="true" cachedOnName="true" cachedOnValue="true"/>
  -        <parameter name="date2" value="06/18/1812" type="style" hidden="false" cachedOnName="true" cachedOnValue="true">
  -            <meta-info>
  -                <title>Battle of Waterloo</title>
  -                <description>Date with popup calendar. Format pattern: mm/dd/yyyy</description>
  -            </meta-info>
  -        </parameter>
  -        <parameter name="date2.style" value="PopupCalendar" hidden="true" cachedOnName="true" cachedOnValue="true"/>
  -        <parameter name="date2.style.format" value="mm/dd/yyyy" hidden="true" cachedOnName="true" cachedOnValue="true"/>
  -        <parameter name="password" value="secret" type="style" hidden="false" cachedOnName="true" cachedOnValue="true">
  -            <meta-info>
  -                <title>Velocity Password</title>
  -                <description>Velocity based password presentation style. Note that this presentation style does not require any custom objects in the context and therefore we can use VelocityParameterPresentationStyle. If custom objects were required, you would extend VelocityParameterPresentationStyle and override buildContext method.</description>
  -            </meta-info>
  -        </parameter>
  -        <parameter name="password.style" value="VelocityParameterPresentationStyle" hidden="true" cachedOnName="true" cachedOnValue="true"/>
  -        <parameter name="password.style.template" value="Password.vm" hidden="true" cachedOnName="true" cachedOnValue="true"/>
  -        <parameter name="password1" value="secret" type="style" hidden="false" cachedOnName="true" cachedOnValue="true">
  -            <meta-info>
  -                <title>JSP Password</title>
  -                <description>JSP based password presentation style. Note that this presentation style does not require any custom objects in the context and therefore we can use JspParameterPresentationStyle. If custom objects were required, you would extend JspParameterPresentationStyle and override buildContext method.</description>
  -            </meta-info>
  -        </parameter>
  -        <parameter name="password1.style" value="JspParameterPresentationStyle" hidden="true" cachedOnName="true" cachedOnValue="true"/>
  -        <parameter name="password1.style.template" value="Password.jsp" hidden="true" cachedOnName="true" cachedOnValue="true"/>
  -        <media-type ref="html"/>
  -        <url cachedOnURL="true"/>
  -        <category group="Jetspeed">demo</category>
  -        <category group="Jetspeed">jsp.demo</category>
  -    </portlet-entry>
  -    <portlet-entry name="BBCFrontPage" hidden="false" type="ref" parent="RSS" application="false">
  -        <meta-info>
  -            <title>BBC Front Page News</title>
  -        </meta-info>
  -        <url>http://www.bbc.co.uk/syndication/feeds/news/ukfs_news/front_page/rss091.xml</url>
  -        <category>news</category>
  -        <category>news.frontpage</category>
  -        <category>news.headlines</category>
  -    </portlet-entry>
  -    <portlet-entry name="BBCTechnology" hidden="false" type="ref" parent="RSS" application="false">
  -        <meta-info>
  -            <title>BBC Technology News</title>
  -        </meta-info>
  -        <url>http://www.bbc.co.uk/syndication/feeds/news/ukfs_news/technology/rss091.xml</url>
  -        <category>news</category>
  -        <category>news.technology</category>
  -    </portlet-entry>
  -    <portlet-entry name="BBCUK" hidden="false" type="ref" parent="RSS" application="false">
  -        <meta-info>
  -            <title>BBC UK News</title>
  -        </meta-info>
  -        <url>http://www.bbc.co.uk/syndication/feeds/news/ukfs_news/uk/rss091.xml</url>
  -        <category>news</category>
  -        <category>news.uk</category>
  -    </portlet-entry>
  -    <portlet-entry name="BBCWorld" hidden="false" type="ref" parent="RSS" application="false">
  -        <meta-info>
  -            <title>BBC World News</title>
  -        </meta-info>
  -        <url>http://www.bbc.co.uk/syndication/feeds/news/ukfs_news/world/rss091.xml</url>
  -        <category>news</category>
  -        <category>news.world</category>
  -    </portlet-entry>
  -    <portlet-entry name="JakartaWeb" hidden="false" type="ref" parent="WebPagePortlet2" application="false">
  -        <meta-info>
  -            <title>JakartaWeb</title>
  -            <description>Jakarta Home Page</description>
  -        </meta-info>
  -        <url>http://jakarta.apache.org/</url>
  -        <category>sites</category>
  -    </portlet-entry>
  -    <portlet-entry name="XSLTDemo" hidden="false" type="ref" parent="XSL" application="false">
  -        <meta-info>
  -            <title>XSLT Demo</title>
  -            <description>Example of using XSLT Portlet</description>
  -        </meta-info>
  -        <url>/xml/footballers.xml</url>
  -        <media-type ref="html"/>
  -        <parameter name="stylesheet.text/html" value="/xml/footballers.xsl" hidden="false"/>
  -        <category>xslt</category>
  -    </portlet-entry>    
  +		</meta-info>
  +		<parameter name="template" value="JSP1_2andJetspeedTagLib.jsp" hidden="true"/>
  +		<media-type ref="html"/>
  +		<category>demo</category>
  +		<category>jsp.demo</category>
  +	</portlet-entry>
  +	<portlet-entry name="jslink_examples" hidden="false" type="ref" parent="Velocity" application="false">
  +		<meta-info>
  +			<title>JSLINK Examples</title>
  +			<description>$jslink examples</description>
  +		</meta-info>
  +		<parameter name="template" value="Tool_jslink_examples" hidden="true"/>
  +		<media-type ref="html"/>
  +		<category>demo</category>
  +		<category>velocity.demo</category>
  +	</portlet-entry>
  +	<portlet-entry name="Search" hidden="false" type="ref" parent="HTML" application="false">
  +		<meta-info>
  +			<title>Search</title>
  +			<description>Search the Internet</description>
  +		</meta-info>
  +		<url>/search/index.html</url>
  +		<category>search</category>
  +		<category>html</category>
  +	</portlet-entry>
  +	<portlet-entry name="Welcome" hidden="false" type="ref" parent="HTML" application="false">
  +		<meta-info>
  +			<title>Welcome</title>
  +		</meta-info>
  +		<url>/welcome.html</url>
  +		<category>demo</category>
  +		<category>html.demo</category>
  +	</portlet-entry>
  +	<portlet-entry name="LoggedInWelcome" hidden="false" type="ref" parent="HTML" application="false">
  +		<security-ref parent="user-view_admin-all"/>
  +		<meta-info>
  +			<title>Welcome to Logged in user</title>
  +			<description>Example of a portlet with not Titlebar</description>
  +		</meta-info>
  +		<parameter name="_showtitlebar" value="false" hidden="false"/>
  +		<url>/LoggedInWelcome.html</url>
  +		<category>demo</category>
  +		<category>html.demo</category>
  +	</portlet-entry>
  +	<portlet-entry name="XMLHack" hidden="false" type="ref" parent="RSS" application="false">
  +		<meta-info>
  +			<title>XMLHack</title>
  +		</meta-info>
  +		<url>http://www.xmlhack.com/rss.php</url>
  +		<category>news.software.opensource</category>
  +	</portlet-entry>
  +	<portlet-entry name="Apacheweek" hidden="false" type="ref" parent="RSS" application="false">
  +		<meta-info>
  +			<title>Apacheweek</title>
  +		</meta-info>
  +		<url>http://www.apacheweek.com/issues/apacheweek-headlines.xml</url>
  +		<category>news.software.opensource</category>
  +	</portlet-entry>
  +	<portlet-entry name="Mozilla" hidden="false" type="ref" parent="RSS" application="false">
  +		<meta-info>
  +			<title>Mozilla</title>
  +		</meta-info>
  +		<parameter name="itemdisplayed" value="10" hidden="false"/>
  +		<url>http://www.mozilla.org/news.rdf</url>
  +		<category>news.software.opensource</category>
  +	</portlet-entry>
  +	<portlet-entry name="Jetspeed" hidden="false" type="ref" parent="RSS" application="false">
  +		<parameter name="openinpopup" value="true" hidden="false"/>
  +		<url>/rss/Jetspeed.rss</url>
  +		<category>news.software.opensource</category>
  +		<meta-info>
  +			<title>Jetspeed Documentation</title>
  +			<description>Jetspeed Documentation Portlet</description>
  +		</meta-info>
  +	</portlet-entry>
  +	<portlet-entry name="JavaWeb" hidden="false" type="ref" parent="WebPagePortlet" application="false">
  +		<meta-info>
  +			<title>JavaSoft</title>
  +			<description>JavaSoft</description>
  +		</meta-info>
  +		<parameter name="dont_remove_applet" value="yes" hidden="false"/>
  +		<url>http://java.sun.com/</url>
  +		<category>sites.companies.sun</category>
  +	</portlet-entry>
  +	<portlet-entry type="ref" parent="Velocity" name="StockQuote" application="false" hidden="false">
  +		<meta-info>
  +			<title>Stock Portfolio</title>
  +			<description>Stock Portfolio Portlet</description>
  +		</meta-info>
  +		<parameter name="template" value="stock-quote" hidden="true"/>
  +		<parameter name="action" value="portlets.StockQuoteAction" hidden="true"/>
  +		<parameter name="columns" value="Symbols,Price,Change,Volume" type="style" hidden="false">
  +			<meta-info>
  +				<title>Columns</title>
  +				<description>Columns to display</description>
  +			</meta-info>
  +		</parameter>
  +		<parameter name="columns.style.items" value="Symbol,Price,Change,Volume" hidden="true" cachedOnName="true" cachedOnValue="true"/>
  +		<parameter name="columns.style.layout" value="$eastwest" hidden="true" cachedOnName="true" cachedOnValue="true"/>
  +		<parameter name="columns.style" value="CheckBoxGroup" hidden="true" cachedOnName="true" cachedOnValue="true"/>
  +		<parameter name="symbols" value="MSFT,IBM,ORCL,SUNW" type="style" hidden="false" cachedOnName="true" cachedOnValue="true">
  +			<meta-info>
  +				<title>Symbols</title>
  +				<description>List of comma-separated stock symbols</description>
  +			</meta-info>
  +		</parameter>
  +		<parameter name="symbols.style" value="TextArea" hidden="true" cachedOnName="true" cachedOnValue="true"/>
  +		<media-type ref="html"/>
  +		<media-type ref="wml"/>
  +		<category>web services</category>
  +		<category>finance.stocks</category>
  +	</portlet-entry>
  +	<portlet-entry name="myLinks" hidden="false" type="ref" parent="LinkPortlet" application="false">
  +		<meta-info>
  +			<title>My Bookmarks</title>
  +			<description>Insert your personal links!</description>
  +		</meta-info>
  +		<parameter name="image" value="contact.gif" hidden="true"/>
  +		<parameter name="link" value="http://www.siemens.de" hidden="true"/>
  +		<parameter name="anchor" value="Siemens germany" hidden="true"/>
  +		<parameter name="description" value="Visit our company home site" hidden="true"/>
  +		<parameter name="image1" value="" hidden="false"/>
  +		<parameter name="link1" value="" hidden="false"/>
  +		<parameter name="anchor1" value="" hidden="false"/>
  +		<parameter name="description1" value="" hidden="true"/>
  +		<parameter name="image2" value="" hidden="false"/>
  +		<parameter name="link2" value="" hidden="false"/>
  +		<parameter name="anchor2" value="" hidden="false"/>
  +		<parameter name="description2" value="" hidden="true"/>
  +		<parameter name="image3" value="" hidden="false"/>
  +		<parameter name="link3" value="" hidden="false"/>
  +		<parameter name="anchor3" value="" hidden="false"/>
  +		<parameter name="description3" value="" hidden="true"/>
  +		<parameter name="image4" value="" hidden="false"/>
  +		<parameter name="link4" value="" hidden="false"/>
  +		<parameter name="anchor4" value="" hidden="false"/>
  +		<parameter name="description4" value="" hidden="true"/>
  +		<media-type ref="html"/>
  +		<category>bookmarks</category>
  +	</portlet-entry>
  +	<portlet-entry name="JetspeedFramed" hidden="false" type="ref" parent="IFramePortlet" application="false">
  +		<meta-info>
  +			<title>Jetspeed Framed</title>
  +			<description>Navigate SomeSite within an IFRAME</description>
  +		</meta-info>
  +		<parameter name="source" value="http://jakarta.apache.org/jetspeed" hidden="false"/>
  +		<media-type ref="html"/>
  +		<category>frames</category>
  +	</portlet-entry>
  +	<portlet-entry name="AggregateTest" type="ref" parent="AggregatePortlet">
  +		<meta-info>
  +			<title>Portlet Aggregation Test</title>
  +			<description>Portlet Aggregation test</description>
  +		</meta-info>
  +		<parameter name="path" value="group/apache/page/news/media-type/html"/>
  +		<media-type ref="html"/>
  +		<category>psml.including</category>
  +	</portlet-entry>
  +	<portlet-entry name="DatabaseBrowserTest" hidden="false" type="ref" parent="DatabaseBrowserPortlet" application="false">
  +		<meta-info>
  +			<title>DatabaseBrowserTest</title>
  +			<description>Simple Test Database Browser Portlet Example</description>
  +		</meta-info>
  +		<parameter name="template" value="database-browser-portlet" hidden="true"/>
  +		<parameter name="customizeTemplate" value="database-browser-customize" hidden="true"/>
  +		<parameter name="action" value="portlets.browser.DatabaseBrowserAction" hidden="true"/>
  +		<parameter name="sql" value="select * from coffees" hidden="false"/>
  +		<!-- to use an alternate torque pool, set this parameter -->
  +		<!-- parameter name="poolname" value="otherpool" hidden="true"/-->
  +		<parameter name="windowSize" value="5" hidden="false"/>
  +		<media-type ref="html"/>
  +		<category>database</category>
  +	</portlet-entry>
  +	<portlet-entry name="InstanceExample" hidden="false" type="instance" application="false">
  +		<classname>org.apache.jetspeed.portal.portlets.BogusPortlet</classname>
  +		<media-type ref="html"/>
  +		<meta-info>
  +			<title>Instance Attribute Example</title>
  +		</meta-info>
  +		<category>persistence</category>
  +	</portlet-entry>
  +	<portlet-entry name="SecurityExample" hidden="false" type="ref" parent="Velocity" application="false">
  +		<security-ref parent="user-view_admin-all"/>
  +		<meta-info>
  +			<title>SecurityExample</title>
  +			<description>Simple Security Example</description>
  +		</meta-info>
  +		<parameter name="template" value="SecurityExample" hidden="true"/>
  +		<media-type ref="html"/>
  +		<category>demo</category>
  +		<category>velocity.demo</category>
  +	</portlet-entry>
  +	<portlet-entry name="BloomingtonWeather" hidden="false" type="ref" parent="CustomizerVelocity" application="false">
  +		<meta-info>
  +			<title>Weather - Bloomington,IN</title>
  +			<description>Current weather conditions</description>
  +		</meta-info>
  +		<parameter name="template" value="weather" hidden="true"/>
  +		<parameter name="customizeTemplate" value="weather-customize" hidden="true"/>
  +		<parameter name="action" value="portlets.WeatherAction" hidden="true"/>
  +		<parameter name="weather_city" value="Bloomington" hidden="false"/>
  +		<parameter name="weather_state" value="IN" hidden="false"/>
  +		<parameter name="weather_style" value="infobox" hidden="false"/>
  +		<media-type ref="html"/>
  +		<category>weather</category>
  +	</portlet-entry>
  +	<portlet-entry name="IstanbulWeather" hidden="false" type="ref" parent="CustomizerVelocity" application="false">
  +		<meta-info>
  +			<title>Weather - Istanbul,Turkey</title>
  +			<description>Current weather conditions</description>
  +		</meta-info>
  +		<parameter name="template" value="weather" hidden="true"/>
  +		<parameter name="customizeTemplate" value="weather-customize" hidden="true"/>
  +		<parameter name="action" value="portlets.WeatherAction" hidden="true"/>
  +		<parameter name="weather_station" value="17060" hidden="false"/>
  +		<parameter name="weather_style" value="infobox" hidden="false"/>
  +		<parameter name="_showtitlebar" value="false" hidden="true"/>
  +		<media-type ref="html"/>
  +		<category>weather</category>
  +	</portlet-entry>
  +	<portlet-entry name="parameter_demo" hidden="false" type="ref" parent="JSP" application="false">
  +		<meta-info>
  +			<title>Parameter Styles Demo</title>
  +			<description>Examples of defining parameter styles</description>
  +		</meta-info>
  +		<parameter name="template" value="parameter-demo-portlet.jsp" hidden="true" cachedOnName="true" cachedOnValue="true"/>
  +		<parameter name="sort" value="Symbol" type="style" hidden="false" cachedOnName="true" cachedOnValue="true">
  +			<meta-info>
  +				<title>Sort</title>
  +				<description>Column to sort by</description>
  +			</meta-info>
  +		</parameter>
  +		<parameter name="sort.style" value="ListBox" hidden="true" cachedOnName="true" cachedOnValue="true"/>
  +		<parameter name="sort.style.items" value="Symbol,Volume,PChange" hidden="true" cachedOnName="true" cachedOnValue="true"/>
  +		<parameter name="columns" value="Symbol,Quote,Date,Time,Change,PChange,Open,High,Low,Volume" type="style" hidden="false" cachedOnName="true" cachedOnValue="true">
  +			<meta-info>
  +				<title>Columns</title>
  +				<description>Columns to display</description>
  +			</meta-info>
  +		</parameter>
  +		<parameter name="columns.style.items" value="Symbol,Quote,Date,Time,Change,PChange,Open,High,Low,Volume" hidden="true" cachedOnName="true" cachedOnValue="true"/>
  +		<parameter name="columns.style.layout" value="$eastwest" hidden="true" cachedOnName="true" cachedOnValue="true"/>
  +		<parameter name="columns.style" value="CheckBoxGroup" hidden="true" cachedOnName="true" cachedOnValue="true"/>
  +		<parameter name="symbols" value="MSFT,ORCL,SUNW,EMC,INTU" type="style" hidden="false" cachedOnName="true" cachedOnValue="true">
  +			<meta-info>
  +				<title>Symbols</title>
  +				<description>List of comma-separated stock symbols</description>
  +			</meta-info>
  +		</parameter>
  +		<parameter name="symbols.style" value="TextArea" hidden="true" cachedOnName="true" cachedOnValue="true"/>
  +		<parameter name="date1" value="Jul-14-1789" type="style" hidden="false" cachedOnName="true" cachedOnValue="true">
  +			<meta-info>
  +				<title>Bastille Day</title>
  +				<description>Date with popup calendar. Format pattern: mmm-dd-yyyy</description>
  +			</meta-info>
  +		</parameter>
  +		<parameter name="date1.style" value="PopupCalendar" hidden="true" cachedOnName="true" cachedOnValue="true"/>
  +		<parameter name="date1.style.format" value="mmm-d-yyyy" hidden="true" cachedOnName="true" cachedOnValue="true"/>
  +		<parameter name="date2" value="06/18/1812" type="style" hidden="false" cachedOnName="true" cachedOnValue="true">
  +			<meta-info>
  +				<title>Battle of Waterloo</title>
  +				<description>Date with popup calendar. Format pattern: mm/dd/yyyy</description>
  +			</meta-info>
  +		</parameter>
  +		<parameter name="date2.style" value="PopupCalendar" hidden="true" cachedOnName="true" cachedOnValue="true"/>
  +		<parameter name="date2.style.format" value="mm/dd/yyyy" hidden="true" cachedOnName="true" cachedOnValue="true"/>
  +		<parameter name="password" value="secret" type="style" hidden="false" cachedOnName="true" cachedOnValue="true">
  +			<meta-info>
  +				<title>Velocity Password</title>
  +				<description>Velocity based password presentation style. Note that this presentation style does not require any custom objects in the context and therefore we can use VelocityParameterPresentationStyle. If custom objects were required, you would extend VelocityParameterPresentationStyle and override buildContext method.</description>
  +			</meta-info>
  +		</parameter>
  +		<parameter name="password.style" value="VelocityParameterPresentationStyle" hidden="true" cachedOnName="true" cachedOnValue="true"/>
  +		<parameter name="password.style.template" value="Password.vm" hidden="true" cachedOnName="true" cachedOnValue="true"/>
  +		<parameter name="password1" value="secret" type="style" hidden="false" cachedOnName="true" cachedOnValue="true">
  +			<meta-info>
  +				<title>JSP Password</title>
  +				<description>JSP based password presentation style. Note that this presentation style does not require any custom objects in the context and therefore we can use JspParameterPresentationStyle. If custom objects were required, you would extend JspParameterPresentationStyle and override buildContext method.</description>
  +			</meta-info>
  +		</parameter>
  +		<parameter name="password1.style" value="JspParameterPresentationStyle" hidden="true" cachedOnName="true" cachedOnValue="true"/>
  +		<parameter name="password1.style.template" value="Password.jsp" hidden="true" cachedOnName="true" cachedOnValue="true"/>
  +		<media-type ref="html"/>
  +		<url cachedOnURL="true"/>
  +		<category group="Jetspeed">demo</category>
  +		<category group="Jetspeed">jsp.demo</category>
  +	</portlet-entry>
  +	<portlet-entry name="BBCFrontPage" hidden="false" type="ref" parent="RSS" application="false">
  +		<meta-info>
  +			<title>BBC Front Page News</title>
  +		</meta-info>
  +		<url>http://www.bbc.co.uk/syndication/feeds/news/ukfs_news/front_page/rss091.xml</url>
  +		<category>news</category>
  +		<category>news.frontpage</category>
  +		<category>news.headlines</category>
  +	</portlet-entry>
  +	<portlet-entry name="BBCTechnology" hidden="false" type="ref" parent="RSS" application="false">
  +		<meta-info>
  +			<title>BBC Technology News</title>
  +		</meta-info>
  +		<url>http://www.bbc.co.uk/syndication/feeds/news/ukfs_news/technology/rss091.xml</url>
  +		<category>news</category>
  +		<category>news.technology</category>
  +	</portlet-entry>
  +	<portlet-entry name="BBCUK" hidden="false" type="ref" parent="RSS" application="false">
  +		<meta-info>
  +			<title>BBC UK News</title>
  +		</meta-info>
  +		<url>http://www.bbc.co.uk/syndication/feeds/news/ukfs_news/uk/rss091.xml</url>
  +		<category>news</category>
  +		<category>news.uk</category>
  +	</portlet-entry>
  +	<portlet-entry name="BBCWorld" hidden="false" type="ref" parent="RSS" application="false">
  +		<meta-info>
  +			<title>BBC World News</title>
  +		</meta-info>
  +		<url>http://www.bbc.co.uk/syndication/feeds/news/ukfs_news/world/rss091.xml</url>
  +		<category>news</category>
  +		<category>news.world</category>
  +	</portlet-entry>
  +	<portlet-entry name="JakartaWeb" hidden="false" type="ref" parent="WebPagePortlet2" application="false">
  +		<meta-info>
  +			<title>JakartaWeb</title>
  +			<description>Jakarta Home Page</description>
  +		</meta-info>
  +		<url>http://jakarta.apache.org/</url>
  +		<category>sites</category>
  +	</portlet-entry>
  +	<portlet-entry name="XSLTDemo" hidden="false" type="ref" parent="XSL" application="false">
  +		<meta-info>
  +			<title>XSLT Demo</title>
  +			<description>Example of using XSLT Portlet</description>
  +		</meta-info>
  +		<url>/xml/footballers.xml</url>
  +		<media-type ref="html"/>
  +		<parameter name="stylesheet.text/html" value="/xml/footballers.xsl" hidden="false"/>
  +		<category>xslt</category>
  +	</portlet-entry>
  +	<portlet-entry name="JspStockQuote" hidden="false" type="ref" parent="JSP" application="false">
  +		<meta-info>
  +			<title>Jsp Stock Portfolio</title>
  +			<description>Stock Portfolio Portlet using JSP with simple action events (refresh and sort)</description>
  +		</meta-info>
  +		<parameter name="template" value="StockQuotes.jsp" hidden="true"/>
  +		<parameter name="action" value="portlets.JspStockQuoteAction" hidden="true"/>
  +		<parameter name="sort" value="Symbol" type="style" hidden="false">
  +			<meta-info>
  +				<title>Sort</title>
  +				<description>Column to sort by. Only sorts in ascending order.</description>
  +			</meta-info>
  +		</parameter>
  +		<parameter name="sort.style" value="ListBox" hidden="true"/>
  +		<parameter name="sort.style.items" value="Symbol,Price,Change,Volume" hidden="true"/>
  +		<parameter name="columns" value="Symbols,Price,Change,Volume" type="style" hidden="false">
  +			<meta-info>
  +				<title>Columns</title>
  +				<description>Columns to display</description>
  +			</meta-info>
  +		</parameter>
  +		<parameter name="columns.style.items" value="Symbol,Price,Change,Volume" hidden="true"/>
  +		<parameter name="columns.style.layout" value="$eastwest" hidden="true"/>
  +		<parameter name="columns.style" value="CheckBoxGroup" hidden="true"/>
  +		<parameter name="symbols" value="MSFT,IBM,ORCL,SUNW" type="style" hidden="false">
  +			<meta-info>
  +				<title>Symbols</title>
  +				<description>List of comma-separated stock symbols. You may also enter symbols in the input field provided in body of portlet. These symbols will remain active until you hit "Get Quotes" with no symbols OR your session expires OR you log off and log back in. At that time, the portlet will display quotes for default symbols specified in the portlet customizer. </description>
  +			</meta-info>
  +		</parameter>
  +		<parameter name="symbols.style" value="TextArea" hidden="true"/>
  +		<media-type ref="html"/>
  +		<media-type ref="wml"/>
  +		<url cachedOnURL="true"/>
  +		<category group="Jetspeed">web services</category>
  +		<category group="Jetspeed">finance.stocks</category>
  +		<category group="Jetspeed">jsp</category>
  +	</portlet-entry>
   </registry>
  
  
  
  1.1                  jakarta-jetspeed/webapp/WEB-INF/templates/jsp/portlets/html/StockQuotes.jsp
  
  Index: StockQuotes.jsp
  ===================================================================
  <%@ taglib uri='/WEB-INF/templates/jsp/tld/template.tld' prefix='jetspeed' %>
  
  <%@ page import = "org.apache.turbine.util.RunData" %> 
  <%@ page import = "org.apache.turbine.util.Log" %> 
  <%@ page import = "org.apache.jetspeed.webservices.finance.stockmarket.StockQuote" %> 
  
  <%
  try{ 
      RunData rundata = (RunData) request.getAttribute("rundata"); 
      StockQuote[] quotes = (StockQuote[]) request.getAttribute("quotes");
      String[] columns = (String[]) request.getAttribute("columns");
      String jspeid = (String) request.getAttribute("js_peid");
      String currentSort = (String) request.getAttribute("sort");
      if (currentSort == null)
      {
          currentSort = "";
      }
      String selectedColumns = (String) request.getAttribute("selected-columns");
  %>
  
  <FORM METHOD="get">
    <INPUT TYPE="hidden" NAME="js_peid" VALUE="<%=jspeid%>">  
    Enter symbol(s) separated with commas: <input name="symbols" type="TEXT"><INPUT TYPE="SUBMIT" NAME="eventSubmit_doRefresh" VALUE="Get Quotes"><BR>
  </FORM>      
  <table>
    <tr>
      <td>
        <table border="true" cellspacing="1" cellpadding="3">
          <tr>
            <%for (int i = 0; columns != null && i < columns.length; i++) {
                String sortInd = "";
                if (columns[i].equals(currentSort))
                {
                    sortInd = "sort";
                }%>
              <TH><A HREF="<jetspeed:dynamicUri/>?eventSubmit_doSort=sort&sort=<%=columns[i]%>&js_peid=<%=jspeid%>"><%=columns[i]%></A><SUP><%=sortInd%></SUP></TH>
            <%}%>
          </tr>
  
            <%for (int j = 0; quotes != null && j < quotes.length; j++) {%>
          <tr>
            <%if (selectedColumns.indexOf("Symbol") >= 0) {%><TD><%=quotes[j].getSymbol()%></TD><%}%>
            <%if (selectedColumns.indexOf("Price") >= 0) {%><TD><%=quotes[j].getPrice()%></TD><%}%>
            <%if (selectedColumns.indexOf("Change") >= 0) {%><TD><%=quotes[j].getChange()%></TD><%}%>
            <%if (selectedColumns.indexOf("Volume") >= 0) {%><TD><%=quotes[j].getVolume()%></TD><%}%>
          </tr>
            <%}%>
        </table>
      </td>
    </tr>
  </table>
  <%} catch (Exception e) {
      Log.error(e);
      return;
  }%>
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>