morciuch    2002/10/24 09:17:22

  Modified:    docs/site changes.html
               src/java/org/apache/jetspeed/modules/actions/portlets
                        CustomizeAction.java CustomizeSetAction.java
               src/java/org/apache/jetspeed/modules/parameters
                        ParameterPresentationStyle.java
               src/java/org/apache/jetspeed/services TemplateLocator.java
               src/java/org/apache/jetspeed/services/template
                        JetspeedTemplateLocatorService.java
                        TemplateLocatorService.java
               src/java/org/apache/jetspeed/util/template JetspeedTool.java
               webapp/WEB-INF/conf demo-portlets.xreg
               xdocs    changes.xml
  Added:       src/java/org/apache/jetspeed/modules/parameters
                        JspParameterPresentationStyle.java
                        VelocityParameterPresentationStyle.java
               webapp/WEB-INF/templates/jsp/parameters/html Password.jsp
               webapp/WEB-INF/templates/vm/parameters/html Password.vm
  Log:
  1. Presentation styles - added support for template based styles (both JSP and 
Velocity). Provided simple style Password in both flavors. Enhanced TemplateLocator to 
look for style templates in parameters folder. Updated parameter_demo portlet with 
examples of using template based parameter styles (see JSP Password and Velocity 
Password parameters).
  
  2. Added additional object, "customizer",  to the normal context in CustomizeAction 
and CustomizerSetAction. This allows to refer to customizer portlet parameters wiithin 
its template.
  
  3. Enhanced JetspeedTool with another getPortletParameter allowing to specify 
parameter current value. This will be useful in rendering portlet parameters using 
styles directly within portlet's content.
  
  Revision  Changes    Path
  1.64      +3 -0      jakarta-jetspeed/docs/site/changes.html
  
  Index: changes.html
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/docs/site/changes.html,v
  retrieving revision 1.63
  retrieving revision 1.64
  diff -u -r1.63 -r1.64
  --- changes.html      18 Oct 2002 00:51:47 -0000      1.63
  +++ changes.html      24 Oct 2002 16:17:20 -0000      1.64
  @@ -131,6 +131,9 @@
   </li>
   -->
   <li>
  +  Update - 2002/10/24 - Added template support (Velocity or JSP) to parameter 
presentation styles (MO)
  +</li>
  +<li>
     Update - 2002/10/16 - Upgrade Scripts, Configuration Parameters for MySQL, Oracle 
to latest Torque (DST)
   </li>
   <li>
  
  
  
  1.16      +1 -0      
jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/CustomizeAction.java
  
  Index: CustomizeAction.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/CustomizeAction.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- CustomizeAction.java      18 Oct 2002 17:49:23 -0000      1.15
  +++ CustomizeAction.java      24 Oct 2002 16:17:20 -0000      1.16
  @@ -165,6 +165,7 @@
           // populate the customizer context
           context.put("parameters", params);
           context.put("portlet", p);
  +        context.put("customizer", portlet);
           
           if (p.getPortletConfig().getSecurityRef() != null)
             context.put("security_ref", 
p.getPortletConfig().getSecurityRef().getParent());
  
  
  
  1.33      +2 -1      
jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/CustomizeSetAction.java
  
  Index: CustomizeSetAction.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/actions/portlets/CustomizeSetAction.java,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- CustomizeSetAction.java   21 Oct 2002 22:31:14 -0000      1.32
  +++ CustomizeSetAction.java   24 Oct 2002 16:17:20 -0000      1.33
  @@ -218,6 +218,7 @@
           context.put("controllers", buildInfoList(rundata, 
Registry.PORTLET_CONTROLLER, mediaType));
           context.put("skins", buildList(rundata, Registry.SKIN));
           context.put("securitys", buildList(rundata, Registry.SECURITY));
  +        context.put("customizer", portlet);
       
           String controllerName = set.getController().getConfig().getName();
           context.put("currentController", controllerName);
  
  
  
  1.2       +43 -1     
jakarta-jetspeed/src/java/org/apache/jetspeed/modules/parameters/ParameterPresentationStyle.java
  
  Index: ParameterPresentationStyle.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/modules/parameters/ParameterPresentationStyle.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ParameterPresentationStyle.java   20 Aug 2002 17:37:18 -0000      1.1
  +++ ParameterPresentationStyle.java   24 Oct 2002 16:17:21 -0000      1.2
  @@ -57,9 +57,12 @@
   // Turbine support
   import org.apache.turbine.modules.Assembler;
   import org.apache.turbine.util.RunData;
  +import org.apache.turbine.util.Log;
   
   // Java support
   import java.util.Map;
  +import java.util.Hashtable;
  +import java.util.Iterator;
   
   /**
    * Interface to be implemented by parameter presentation style class
  @@ -115,6 +118,45 @@
           {
               result = def;
           }
  +
  +        return result;
  +    }
  +
  +    /**
  +     * <P>Returns javascript event definitions as defined by 
"[name].style.javascript:[event]".</P>
  +     * <P> For example: <CODE>symbols.style.javascipt:onChange</CODE>
  +     * 
  +     * @return map of javascript events
  +     */
  +    public Map getJavascriptEvents()
  +    {
  +
  +        Hashtable result = null;
  +
  +        if (this.styleparms != null) 
  +        {
  +             Iterator it = this.styleparms.keySet().iterator();
  +             while (it.hasNext()) 
  +             {
  +                 String parmkey = (String) it.next();
  +                 if (parmkey.startsWith("javascript:")) 
  +                 {
  +                     try 
  +                     {
  +                         if (result == null)
  +                         {
  +                             result = new Hashtable();
  +                         }
  +                         String event = parmkey.substring(parmkey.lastIndexOf(":") 
+ 1);
  +                         result.put(event, this.styleparms.get(parmkey));
  +                     } 
  +                     catch (Exception e) 
  +                     {
  +                         Log.error(e);
  +                     }
  +                 }
  +             }
  +         }
   
           return result;
       }
  
  
  
  1.1                  
jakarta-jetspeed/src/java/org/apache/jetspeed/modules/parameters/JspParameterPresentationStyle.java
  
  Index: JspParameterPresentationStyle.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 [EMAIL PROTECTED]
   *
   * 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.parameters; 
  
  // Turbine support
  import org.apache.turbine.util.Log;
  import org.apache.turbine.util.RunData;
  import org.apache.turbine.services.TurbineServices;
  import org.apache.turbine.services.jsp.JspService;
  
  // Java stuff
  import java.util.Map;
  
  // jetspeed stuff
  import org.apache.jetspeed.services.TemplateLocator;
  
  /**
   * Generic jsp-based presentation style. The following default objects are put in 
the context:
   * <UL>
   * <LI>data - rundata object</LI>
   * <LI>name - name of the parameter</LI>
   * <LI>value - current value of the parameter</LI>
   * <LI>parms - map of additional style parameters</LI>
   * </UL>
   * 
   * <P>Supporting jsp templates should be placed in 
${velocity-templates-root}/parameters folder.</p>
   * 
   * <P>It may be used directly with "template" as the only required parameter. This 
is useful when the
   * no additional objects are needed by the template.</P>
   * 
   * <P>If additional objects need to be put in the context, a new class extending 
JspParameterPresentationStyle
   * should be created. Override buildContext to place custom objects in the jsp 
context.</P>
   * 
   * <P>If "template" parameter is not specified, it is assumed that the template name 
is "classname.vm".</P>
   * 
   * @author <a href="mailto:morciuch@;apache.org">Mark Orciuch</a>
   * @version $Id: JspParameterPresentationStyle.java,v 1.1 2002/10/24 16:17:21 
morciuch Exp $
   */
  
  public class JspParameterPresentationStyle extends ParameterPresentationStyle
  {
  
      /**
       * Returns presentation control
       * 
       * @param data - rundata object
       * @param name - parameter name
       * @param value - current parameter value
       * @param parms - additional style parameters
       * @return string
       */
      public String getContent(RunData data, String name, String value, Map parms)
      {
          String result = null;
  
          // Get reference to jsp service
          JspService jspService = (JspService) 
TurbineServices.getInstance().getService(JspService.SERVICE_NAME);
  
          // Put basics in the context
          data.getRequest().setAttribute("data", data);
          data.getRequest().setAttribute("name", name);
          data.getRequest().setAttribute("value", value);
          data.getRequest().setAttribute("parms", parms);
  
          try
          {
              // Add custom objects to the context
              this.buildContext(data, name, value, parms);
  
              // Build default template name (classname + .vm)
              String className = this.getClass().getName();
              int pos = className.lastIndexOf(".");
              pos = pos < 0 ? 0 : pos + 1;
              className = className.substring(pos);
  
              // Render the template
              String template = (String) this.getParm("template", className + ".jsp");
              String templatePath = TemplateLocator.locateParameterTemplate(data, 
template);
              jspService.handleRequest(data, templatePath);
              result = "";
          }
          catch (Exception e)
          {
              Log.error(e);
              // Fallback to input text box presentation style
              result = "<input type=\"text\" name=\"" + name + "\" value=\"" + value + 
"\"";
          }
  
          return result;
  
      }
  
      /**
       * Override this method to put your own objects in the Velocity context
       * 
       * @param data
       * @param name
       * @param value
       * @param parms
       * @param context
       */
      public void buildContext(RunData data, String name, String value, Map parms)
      {
  
      }
  }
  
  
  1.1                  
jakarta-jetspeed/src/java/org/apache/jetspeed/modules/parameters/VelocityParameterPresentationStyle.java
  
  Index: VelocityParameterPresentationStyle.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 [EMAIL PROTECTED]
   *
   * 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.parameters; 
  
  // Turbine support
  import org.apache.turbine.util.Log;
  import org.apache.turbine.util.RunData;
  import org.apache.turbine.services.velocity.TurbineVelocity;
  
  // Java stuff
  import java.util.Map;
  
  // jetspeed stuff
  import org.apache.jetspeed.services.TemplateLocator;
  
  // Velocity Stuff
  import org.apache.velocity.context.Context;
  
  /**
   * Generic Velocity-based presentation style. The following default objects are put 
in the context:
   * <UL>
   * <LI>data - rundata object</LI>
   * <LI>name - name of the parameter</LI>
   * <LI>value - current value of the parameter</LI>
   * <LI>parms - map of additional style parameters</LI>
   * </UL>
   * 
   * <P>Supporting Velocity templates should be placed in 
${velocity-templates-root}/parameters folder.</p>
   * 
   * <P>It may be used directly with "template" as the only required parameter. This 
is useful when the
   * no additional objects are needed by the template.</P>
   * 
   * <P>If additional objects need to be put in the context, a new class extending 
VelocityParameterPresentationStyle
   * should be created. Override buildContext to place custom objects in the Velocity 
context.</P>
   * 
   * <P>If "template" parameter is not specified, it is assumed that the template name 
is "classname.vm".</P>
   * 
   * @author <a href="mailto:morciuch@;apache.org">Mark Orciuch</a>
   * @version $Id: VelocityParameterPresentationStyle.java,v 1.1 2002/10/24 16:17:21 
morciuch Exp $
   */
  
  public class VelocityParameterPresentationStyle extends ParameterPresentationStyle
  {
  
      /**
       * Returns presentation control
       * 
       * @param data - rundata object
       * @param name - parameter name
       * @param value - current parameter value
       * @param parms - additional style parameters
       * @return string
       */
      public String getContent(RunData data, String name, String value, Map parms)
      {
          String result = null;
  
          // create a blank context
          Context context = TurbineVelocity.getContext();
  
          // Put basics in the context
          context.put("data", data);
          context.put("name", name);
          context.put("value", value);
          context.put("parms", parms);
  
          try
          {
              // Add custom objects to the context
              this.buildContext(data, name, value, parms, context);
  
              // Build default template name (classname + .vm)
              String className = this.getClass().getName();
              int pos = className.lastIndexOf(".");
              pos = pos < 0 ? 0 : pos + 1;
              className = className.substring(pos);
  
              // Render the template
              String template = (String) this.getParm("template", className + ".vm");
              String templatePath = TemplateLocator.locateParameterTemplate(data, 
template);
              result = TurbineVelocity.handleRequest(context, templatePath);
          }
          catch (Exception e)
          {
              Log.error(e);
              // Fallback to input text box presentation style
              result = "<input type=\"text\" name=\"" + name + "\" value=\"" + value + 
"\"";
          }
  
          TurbineVelocity.requestFinished(context);       
  
          return result;
  
      }
  
      /**
       * Override this method to put your own objects in the Velocity context
       * 
       * @param data
       * @param name
       * @param value
       * @param parms
       * @param context
       */
      public void buildContext(RunData data, String name, String value, Map parms, 
Context context)
      {
  
      }
  }
  
  
  1.4       +10 -1     
jakarta-jetspeed/src/java/org/apache/jetspeed/services/TemplateLocator.java
  
  Index: TemplateLocator.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/services/TemplateLocator.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TemplateLocator.java      24 Nov 2001 00:44:36 -0000      1.3
  +++ TemplateLocator.java      24 Oct 2002 16:17:21 -0000      1.4
  @@ -148,4 +148,13 @@
       {
           return getService().locateEmailTemplate(data, template, locale);
       }
  +
  +    /**
  +     * @see TemplateLocatorService#locateParameterTemplate
  +     */
  +    public static String locateParameterTemplate(RunData data, String template)
  +    {
  +        return getService().locateParameterTemplate(data, template);
  +    }
  +
   }
  
  
  
  1.12      +35 -1     
jakarta-jetspeed/src/java/org/apache/jetspeed/services/template/JetspeedTemplateLocatorService.java
  
  Index: JetspeedTemplateLocatorService.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/services/template/JetspeedTemplateLocatorService.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- JetspeedTemplateLocatorService.java       17 Aug 2002 00:42:19 -0000      1.11
  +++ JetspeedTemplateLocatorService.java       24 Oct 2002 16:17:21 -0000      1.12
  @@ -123,6 +123,7 @@
       private final static String DIR_CONTROLS = "/controls";
       private final static String DIR_CONTROLLERS = "/controllers";
       private final static String DIR_NAVIGATIONS = "/navigations";
  +    private final static String DIR_PARAMETERS = "/parameters";
       private final static String DIR_EMAILS = "/emails";
       private static final String PATH_SEPARATOR = "/";
   
  @@ -426,6 +427,39 @@
                return DIR_EMAILS + located;
            return null;
        }
  +
  +    /**
  +     * Locate a parameter style template using Jetspeed template location 
algorithm, searching by
  +     * mediatype and language criteria extracted from the request state in rundata.
  +     *
  +     * @param data The rundata for the request.
  +     * @param template The name of the template.
  +     *
  +     * @return The path relative to the portlets directory for the requested 
portlet template,
  +     *          or null if not found.
  +     */
  +    public String locateParameterTemplate(RunData data, String template)
  +    {
  +        String path = localizeTemplateName(data);
  +
  +        String located = locateTemplate(data, DIR_PARAMETERS, path, template);
  +        if (null == located)
  +        {
  +            // Try to locate it directly on file system, perhaps it was recently 
added
  +            useNameCache = false;
  +            located = locateTemplate(data, DIR_PARAMETERS, path, template);
  +            if (null != located)
  +            {
  +                // add it to the map
  +                templateMap.put( located, null );
  +            }
  +            useNameCache = true;
  +        }
  +
  +        if (null != located)
  +            return DIR_PARAMETERS + located;
  +        return null;
  +    }
   
       /**
        * General template location algorithm. Starts with the most specific resource,
  
  
  
  1.6       +13 -1     
jakarta-jetspeed/src/java/org/apache/jetspeed/services/template/TemplateLocatorService.java
  
  Index: TemplateLocatorService.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/services/template/TemplateLocatorService.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- TemplateLocatorService.java       28 Jun 2002 05:37:36 -0000      1.5
  +++ TemplateLocatorService.java       24 Oct 2002 16:17:21 -0000      1.6
  @@ -185,4 +185,16 @@
        */
       public String locateEmailTemplate(RunData data, String template, Locale locale);
   
  +    /**
  +     * Locate a parameter style template using Jetspeed template location 
algorithm, searching by
  +     * mediatype and language criteria extracted from the request state in rundata.
  +     *
  +     * @param data The rundata for the request.
  +     * @param template The name of the template.
  +     *
  +     * @return The path relative to the parameters directory for the requested 
portlet template,
  +     *          or null if not found.
  +     */
  +    public String locateParameterTemplate(RunData data, String template);
  +
   }
  
  
  
  1.26      +51 -10    
jakarta-jetspeed/src/java/org/apache/jetspeed/util/template/JetspeedTool.java
  
  Index: JetspeedTool.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/util/template/JetspeedTool.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- JetspeedTool.java 7 Oct 2002 17:50:22 -0000       1.25
  +++ JetspeedTool.java 24 Oct 2002 16:17:21 -0000      1.26
  @@ -72,6 +72,12 @@
   import org.apache.jetspeed.om.profile.ProfileException;
   import org.apache.jetspeed.om.profile.Entry;
   import org.apache.jetspeed.modules.ParameterLoader;
  +import org.apache.jetspeed.services.security.PortalResource;
  +import org.apache.jetspeed.om.registry.Parameter;
  +import org.apache.jetspeed.om.registry.PortletEntry;
  +import org.apache.jetspeed.om.security.JetspeedUser;
  +import org.apache.jetspeed.services.Registry;
  +import org.apache.jetspeed.services.JetspeedSecurity;
   
   import java.util.Enumeration;
   import java.util.Stack;
  @@ -629,21 +635,56 @@
        */
       public static String getPortletParameter(RunData data, Portlet portlet, String 
parmName)
       {
  +
  +        if (portlet != null && parmName != null) 
  +        {
  +            String parmValue = 
portlet.getPortletConfig().getInitParameter(parmName, "");
  +            return getPortletParameter(data, portlet, parmName, parmValue);
  +        }
  +
  +        return "";
  +    }
  +
  +    /**
  +     * Returns a parameter in its defined parameter style
  +     * 
  +     * @param data      for this request
  +     * @param portlet   portlet instance
  +     * @param parmName  parameter name
  +     * @param parmValue current parameter value
  +     * @return current parameter value using specified presentation style
  +     */
  +    public static String getPortletParameter(RunData data, Portlet portlet, String 
parmName, String parmValue)
  +    {
           String result = null;
           try 
           {
               if (portlet != null && parmName != null) 
               {
  -                Map portletParms = portlet.getPortletConfig().getInitParameters();
  -                String parmValue = 
portlet.getPortletConfig().getInitParameter(parmName);
  -                String parmStyle = 
portlet.getPortletConfig().getInitParameter(parmName + ".style");
  -                if (parmStyle != null) 
  +                // Retrieve registry entry and its parameter
  +                PortletEntry entry = (PortletEntry) 
Registry.getEntry(Registry.PORTLET, portlet.getName());
  +                Parameter param = entry.getParameter(parmName);
  +
  +                // Verify security for the parameter
  +                boolean canAccess = JetspeedSecurity.checkPermission((JetspeedUser) 
data.getUser(), 
  +                                                                     new 
PortalResource(entry, param), 
  +                                                                     
JetspeedSecurity.PERMISSION_CUSTOMIZE);
  +                if (canAccess)
                   {
  -                    result = ParameterLoader.getInstance().eval(data, 
  -                                                                parmStyle, 
  -                                                                parmName, 
  -                                                                parmValue, 
  -                                                                portletParms);      
          
  +                    Map portletParms = 
portlet.getPortletConfig().getInitParameters();
  +                    String parmStyle = 
portlet.getPortletConfig().getInitParameter(parmName + ".style");
  +                    if (parmStyle != null) 
  +                    {
  +                        result = ParameterLoader.getInstance().eval(data, 
  +                                                                    parmStyle, 
  +                                                                    parmName, 
  +                                                                    parmValue, 
  +                                                                    portletParms);  
              
  +                    }
  +                    else
  +                    {
  +                        result = "<input type=\"text\" name=\"" + parmName + "\" 
value=\"" + parmValue + "\"";
  +                    }
                   }
               }
           } 
  
  
  
  1.24      +323 -356  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.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- demo-portlets.xreg        9 Sep 2002 18:50:23 -0000       1.23
  +++ demo-portlets.xreg        24 Oct 2002 16:17:21 -0000      1.24
  @@ -1,362 +1,333 @@
   <?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="false"/>
  -        <parameter name="cache-period-milliseconds" value="60000" hidden="false"/>
  -        <parameter name="action" value="portlets.HelloAction" hidden="false"/>
  -        <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="false"/>
  -        <parameter name="action" value="portlets.HelloAction" hidden="false"/>
  -        <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="false"/>
  -        <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="false"/>
  +             <parameter name="cache-period-milliseconds" value="60000" 
hidden="false"/>
  +             <parameter name="action" value="portlets.HelloAction" hidden="false"/>
  +             <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="false"/>
  +             <parameter name="action" value="portlets.HelloAction" hidden="false"/>
  +             <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="false"/>
  +             <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="false"/>
  -        <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="false"/>
  +             <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="false"/>
  -        <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="false"/>
  -        <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="CustomizerVelocity" name="StockQuote" 
application="false" hidden="false">
  -      <parameter name="template" value="stock-quote"/>
  -      <parameter name="action" value="portlets.StockQuoteAction"/>
  -      <meta-info>
  -        <title>Stock Portfolio</title>
  -        <description>Stock Portfolio Portlet</description>
  -      </meta-info>
  -      <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 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="false"/>
  -        <parameter name="customizeTemplate" value="database-browser-customize" 
hidden="false"/>
  -        <parameter name="action" value="portlets.browser.DatabaseBrowserAction" 
hidden="false"/>
  -        <parameter name="sql" value="select * from coffees" hidden="false"/>
  -        <!-- to use an alternate torque pool, set this parameter -->
  -        <!-- parameter name="poolname" value="otherpool" hidden="false"/-->
  -        <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="false"/>
  -        <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="false"/>
  -        <parameter name="customizeTemplate" value="weather-customize" 
hidden="false"/>
  -        <parameter name="action" value="portlets.WeatherAction" hidden="false"/>
  -        <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="false"/>
  -        <parameter name="customizeTemplate" value="weather-customize" 
hidden="false"/>
  -        <parameter name="action" value="portlets.WeatherAction" hidden="false"/>
  -        <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"/>
  -        <media-type ref="html"/>
  -        <url cachedOnURL="true"/>
  -        <category group="Jetspeed">demo</category>
  -        <category group="Jetspeed">jsp.demo</category>
  -    </portlet-entry>
  -
  +             </meta-info>
  +             <parameter name="template" value="JSP1_2andJetspeedTagLib.jsp" 
hidden="false"/>
  +             <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="false"/>
  +             <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="CustomizerVelocity" name="StockQuote" 
application="false" hidden="false">
  +             <parameter name="template" value="stock-quote"/>
  +             <parameter name="action" value="portlets.StockQuoteAction"/>
  +             <meta-info>
  +                     <title>Stock Portfolio</title>
  +                     <description>Stock Portfolio Portlet</description>
  +             </meta-info>
  +             <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 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="false"/>
  +             <parameter name="customizeTemplate" value="database-browser-customize" 
hidden="false"/>
  +             <parameter name="action" 
value="portlets.browser.DatabaseBrowserAction" hidden="false"/>
  +             <parameter name="sql" value="select * from coffees" hidden="false"/>
  +             <!-- to use an alternate torque pool, set this parameter -->
  +             <!-- parameter name="poolname" value="otherpool" hidden="false"/-->
  +             <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="false"/>
  +             <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="false"/>
  +             <parameter name="customizeTemplate" value="weather-customize" 
hidden="false"/>
  +             <parameter name="action" value="portlets.WeatherAction" 
hidden="false"/>
  +             <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="false"/>
  +             <parameter name="customizeTemplate" value="weather-customize" 
hidden="false"/>
  +             <parameter name="action" value="portlets.WeatherAction" 
hidden="false"/>
  +             <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>
  @@ -366,8 +337,7 @@
                <category>news.frontpage</category>
                <category>news.headlines</category>
        </portlet-entry>
  -     
  -    <portlet-entry name="BBCTechnology" hidden="false" type="ref" parent="RSS" 
application="false">
  +     <portlet-entry name="BBCTechnology" hidden="false" type="ref" parent="RSS" 
application="false">
                <meta-info>
                        <title>BBC Technology News</title>
                </meta-info>
  @@ -375,8 +345,7 @@
                <category>news</category>
                <category>news.technology</category>
        </portlet-entry>
  -     
  -    <portlet-entry name="BBCUK" hidden="false" type="ref" parent="RSS" 
application="false">
  +     <portlet-entry name="BBCUK" hidden="false" type="ref" parent="RSS" 
application="false">
                <meta-info>
                        <title>BBC UK News</title>
                </meta-info>
  @@ -384,8 +353,7 @@
                <category>news</category>
                <category>news.uk</category>
        </portlet-entry>
  -     
  -    <portlet-entry name="BBCWorld" hidden="false" type="ref" parent="RSS" 
application="false">
  +     <portlet-entry name="BBCWorld" hidden="false" type="ref" parent="RSS" 
application="false">
                <meta-info>
                        <title>BBC World News</title>
                </meta-info>
  @@ -393,5 +361,4 @@
                <category>news</category>
                <category>news.world</category>
        </portlet-entry>
  -
   </registry>
  
  
  
  1.1                  
jakarta-jetspeed/webapp/WEB-INF/templates/jsp/parameters/html/Password.jsp
  
  Index: Password.jsp
  ===================================================================
  <input type="password" name="<%=request.getAttribute("name")%>" 
value="<%=request.getAttribute("value")%>">
  
  
  
  1.1                  
jakarta-jetspeed/webapp/WEB-INF/templates/vm/parameters/html/Password.vm
  
  Index: Password.vm
  ===================================================================
  <input type="password" name="$name" value="$value">
  
  
  
  1.82      +4 -1      jakarta-jetspeed/xdocs/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/xdocs/changes.xml,v
  retrieving revision 1.81
  retrieving revision 1.82
  diff -u -r1.81 -r1.82
  --- changes.xml       18 Oct 2002 00:51:33 -0000      1.81
  +++ changes.xml       24 Oct 2002 16:17:22 -0000      1.82
  @@ -23,6 +23,9 @@
   </li>
   -->
   <li>
  +  Update - 2002/10/24 - Added template support (Velocity or JSP) to parameter 
presentation styles (MO)
  +</li>
  +<li>
     Update - 2002/10/16 - Upgrade Scripts, Configuration Parameters for MySQL, Oracle 
to latest Torque (DST)
   </li>
   <li>
  
  
  

--
To unsubscribe, e-mail:   <mailto:jetspeed-dev-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:jetspeed-dev-help@;jakarta.apache.org>

Reply via email to