You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by hl...@apache.org on 2005/05/31 18:35:12 UTC

cvs commit: jakarta-tapestry/framework/src/test/org/apache/tapestry/spec TestComponentSpecification.java

hlship      2005/05/31 09:35:12

  Modified:    framework/src/java/org/apache/tapestry/pageload
                        PageloadStrings.properties
                        VerifyRequiredParametersVisitor.java
                        PageLoader.java PageloadMessages.java
                        QueuedInheritedBinding.java
               src/documentation/content/xdocs/UsersGuide spec.xml
               framework/src/test/org/apache/tapestry/junit/parse
                        Parameter.jwc TestSpecificationParser.java
               framework/src/java/org/apache/tapestry/parse
                        SpecificationParser.java Tapestry_4_0.dtd
               src/documentation/resources/stylesheets changes2document.xsl
               contrib  build.xml
               framework/src/java/org/apache/tapestry/services/impl
                        ImplStrings.properties ImplMessages.java
                        ComponentTemplateLoaderLogic.java
               framework build.xml
               framework/src/java/org/apache/tapestry/spec
                        IComponentSpecification.java
                        ParameterSpecification.java
                        ComponentSpecification.java
                        IParameterSpecification.java
               portlet  build.xml
               framework/src/test/org/apache/tapestry/spec
                        TestComponentSpecification.java
  Added:       framework/src/test/org/apache/tapestry/pageload
                        TestPageLoader.java
                        TestVerifyRequiredParametersVisitor.java
               .settings org.eclipse.jdt.ui.prefs
                        org.eclipse.jdt.core.prefs
  Log:
  Add support for "aliases" for component parameters.
  
  Revision  Changes    Path
  1.4       +3 -1      jakarta-tapestry/framework/src/java/org/apache/tapestry/pageload/PageloadStrings.properties
  
  Index: PageloadStrings.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/pageload/PageloadStrings.properties,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- PageloadStrings.properties	6 Jan 2005 02:17:21 -0000	1.3
  +++ PageloadStrings.properties	31 May 2005 16:35:11 -0000	1.4
  @@ -25,4 +25,6 @@
   class-not-page=Class {0} does not implement the IPage interface.
   parameter-name=parameter {0}
   default-parameter-name=parameter {0} default value
  -initializer-name=initializer for property {0}
  \ No newline at end of file
  +initializer-name=initializer for property {0}
  +duplicate-parameter=A binding for parameter {0} conflicts with a previous binding (at {1}).
  +used-parameter-alias=Parameter {2} (for component {1}, at {0}) was bound; this parameter has been deprecated, bind parameter {3} instead.
  
  
  
  1.5       +18 -10    jakarta-tapestry/framework/src/java/org/apache/tapestry/pageload/VerifyRequiredParametersVisitor.java
  
  Index: VerifyRequiredParametersVisitor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/pageload/VerifyRequiredParametersVisitor.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- VerifyRequiredParametersVisitor.java	6 Jan 2005 02:17:21 -0000	1.4
  +++ VerifyRequiredParametersVisitor.java	31 May 2005 16:35:11 -0000	1.5
  @@ -22,11 +22,11 @@
   import org.apache.tapestry.spec.IParameterSpecification;
   
   /**
  - *  Verify whether all required parameters in the examined component are bound,
  - *  and if they are not, throw an exception.
  + * Verify whether all required parameters in the examined component are bound, and if they are not,
  + * throw an exception.
    * 
  - *  @author mindbridge
  - *  @since 3.0
  + * @author mindbridge
  + * @since 3.0
    */
   public class VerifyRequiredParametersVisitor implements IComponentVisitor
   {
  @@ -44,12 +44,20 @@
               String name = (String) i.next();
               IParameterSpecification parameterSpec = spec.getParameter(name);
   
  -            if (parameterSpec.isRequired() && component.getBinding(name) == null)
  -                throw new ApplicationRuntimeException(
  -                    PageloadMessages.requiredParameterNotBound(name, component),
  -                    component,
  -                    component.getLocation(),
  -                    null);
  +            if (!parameterSpec.isRequired())
  +                continue;
  +
  +            // The names include aliases, but the aliases are translated to primary names
  +            // as they are bound. The pspec will be keyed under both the alias name
  +            // and the primary name, so the check only should apply to the primary name.
  +
  +            if (!name.equals(parameterSpec.getParameterName()))
  +                continue;
  +
  +            if (component.getBinding(name) == null)
  +                throw new ApplicationRuntimeException(PageloadMessages.requiredParameterNotBound(
  +                        name,
  +                        component), component, component.getLocation(), null);
           }
       }
   
  
  
  
  1.25      +52 -11    jakarta-tapestry/framework/src/java/org/apache/tapestry/pageload/PageLoader.java
  
  Index: PageLoader.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/pageload/PageLoader.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- PageLoader.java	11 May 2005 17:07:20 -0000	1.24
  +++ PageLoader.java	31 May 2005 16:35:11 -0000	1.25
  @@ -54,6 +54,7 @@
   import org.apache.tapestry.spec.IComponentSpecification;
   import org.apache.tapestry.spec.IContainedComponent;
   import org.apache.tapestry.spec.IListenerBindingSpecification;
  +import org.apache.tapestry.spec.IParameterSpecification;
   
   /**
    * Runs the process of building the component hierarchy for an entire page.
  @@ -174,14 +175,11 @@
        *            {@link IComponentSpecification}).
        */
   
  -    private void bind(IComponent container, IComponent component, IContainedComponent contained)
  +    void bind(IComponent container, IComponent component, IContainedComponent contained)
       {
           IComponentSpecification spec = component.getSpecification();
           boolean formalOnly = !spec.getAllowInformalParameters();
   
  -        IComponentSpecification containerSpec = container.getSpecification();
  -        boolean containerFormalOnly = !containerSpec.getAllowInformalParameters();
  -
           if (contained.getInheritInformalParameters())
           {
               if (formalOnly)
  @@ -189,7 +187,9 @@
                           .inheritInformalInvalidComponentFormalOnly(component), component, contained
                           .getLocation(), null);
   
  -            if (containerFormalOnly)
  +            IComponentSpecification containerSpec = container.getSpecification();
  +
  +            if (!containerSpec.getAllowInformalParameters())
                   throw new ApplicationRuntimeException(PageloadMessages
                           .inheritInformalInvalidContainerFormalOnly(container, component),
                           component, contained.getLocation(), null);
  @@ -204,7 +204,11 @@
           {
               String name = (String) i.next();
   
  -            boolean isFormal = spec.getParameter(name) != null;
  +            IParameterSpecification pspec = spec.getParameter(name);
  +
  +            boolean isFormal = pspec != null;
  +
  +            String parameterName = isFormal ? pspec.getParameterName() : name;
   
               IBindingSpecification bspec = contained.getBinding(name);
   
  @@ -223,6 +227,13 @@
               if (!isFormal && spec.isReservedParameterName(name))
                   continue;
   
  +            if (isFormal && !name.equals(parameterName))
  +                _log.error(PageloadMessages.usedParameterAlias(
  +                        contained,
  +                        name,
  +                        parameterName,
  +                        bspec.getLocation()));
  +
               // The type determines how to interpret the value:
               // As a simple static String
               // As a nested property name (relative to the component)
  @@ -241,14 +252,17 @@
               if (type == BindingType.INHERITED)
               {
                   QueuedInheritedBinding queued = new QueuedInheritedBinding(component, bspec
  -                        .getValue(), name);
  +                        .getValue(), parameterName);
                   _inheritedBindingQueue.add(queued);
                   continue;
               }
   
               if (type == BindingType.LISTENER)
               {
  -                constructListenerBinding(component, name, (IListenerBindingSpecification) bspec);
  +                constructListenerBinding(
  +                        component,
  +                        parameterName,
  +                        (IListenerBindingSpecification) bspec);
                   continue;
               }
   
  @@ -259,15 +273,42 @@
   
               String defaultBindingType = BindingUtils.getDefaultBindingType(
                       spec,
  -                    name,
  +                    parameterName,
                       BindingConstants.OGNL_PREFIX);
   
               IBinding binding = convert(container, description, defaultBindingType, bspec);
   
  -            component.setBinding(name, binding);
  +            addBindingToComponent(component, parameterName, binding);
           }
       }
   
  +    /**
  +     * Adds a binding to the component, checking to see if there's a name conflict (an existing
  +     * binding for the same parameter ... possibly because parameter names can be aliased.
  +     * 
  +     * @param component
  +     *            to which the binding should be added
  +     * @param parameterName
  +     *            the name of the parameter to bind, which should be a true name, not an alias
  +     * @param binding
  +     *            the binding to add
  +     * @throws ApplicationRuntimeException
  +     *             if a binding already exists
  +     * @since 4.0
  +     */
  +
  +    static void addBindingToComponent(IComponent component, String parameterName, IBinding binding)
  +    {
  +        IBinding existing = component.getBinding(parameterName);
  +
  +        if (existing != null)
  +            throw new ApplicationRuntimeException(PageloadMessages.duplicateParameter(
  +                    parameterName,
  +                    existing), component, binding.getLocation(), null);
  +
  +        component.setBinding(parameterName, binding);
  +    }
  +
       private IBinding convert(IComponent container, String description, String defaultBindingType,
               IBindingSpecification spec)
       {
  @@ -308,7 +349,7 @@
           IBinding binding = new ListenerBinding(description, _valueConverter, spec.getLocation(),
                   component.getContainer(), language, spec.getScript(), _managerFactory);
   
  -        component.setBinding(parameterName, binding);
  +        addBindingToComponent(component, parameterName, binding);
       }
   
       /**
  
  
  
  1.9       +17 -0     jakarta-tapestry/framework/src/java/org/apache/tapestry/pageload/PageloadMessages.java
  
  Index: PageloadMessages.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/pageload/PageloadMessages.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- PageloadMessages.java	13 May 2005 13:21:06 -0000	1.8
  +++ PageloadMessages.java	31 May 2005 16:35:11 -0000	1.9
  @@ -14,8 +14,12 @@
   
   package org.apache.tapestry.pageload;
   
  +import org.apache.hivemind.HiveMind;
  +import org.apache.hivemind.Location;
   import org.apache.hivemind.impl.MessageFormatter;
  +import org.apache.tapestry.IBinding;
   import org.apache.tapestry.IComponent;
  +import org.apache.tapestry.spec.IContainedComponent;
   
   /**
    * Messages for the pageload package
  @@ -109,4 +113,17 @@
           return _formatter.format("parameter-name", name);
       }
   
  +    static String duplicateParameter(String parameterName, IBinding binding)
  +    {
  +        return _formatter.format("duplicate-parameter", parameterName, HiveMind
  +                .getLocationString(binding));
  +    }
  +
  +    public static String usedParameterAlias(IContainedComponent contained, String name,
  +            String parameterName, Location bindingLocation)
  +    {
  +        return _formatter.format("used-parameter-alias", new Object[]
  +        { HiveMind.getLocationString(bindingLocation), contained.getType(), name, parameterName });
  +    }
  +
   }
  \ No newline at end of file
  
  
  
  1.5       +7 -8      jakarta-tapestry/framework/src/java/org/apache/tapestry/pageload/QueuedInheritedBinding.java
  
  Index: QueuedInheritedBinding.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/pageload/QueuedInheritedBinding.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- QueuedInheritedBinding.java	18 Apr 2005 17:06:40 -0000	1.4
  +++ QueuedInheritedBinding.java	31 May 2005 16:35:11 -0000	1.5
  @@ -18,22 +18,21 @@
   import org.apache.tapestry.IComponent;
   
   /**
  - * Handles connecting an inherited binding.  These will be going away soon (if not in
  - * release 4.0 itself).
  - *
  + * Handles connecting an inherited binding. These will be going away soon (if not in release 4.0
  + * itself).
  + * 
    * @author Howard Lewis Ship
    * @since 4.0
    */
   class QueuedInheritedBinding implements IQueuedInheritedBinding
   {
       private IComponent _component;
  +
       private String _containerParameterName;
  +
       private String _parameterName;
   
  -    QueuedInheritedBinding(
  -        IComponent component,
  -        String containerParameterName,
  -        String parameterName)
  +    QueuedInheritedBinding(IComponent component, String containerParameterName, String parameterName)
       {
           _component = component;
           _containerParameterName = containerParameterName;
  @@ -47,6 +46,6 @@
           if (binding == null)
               return;
   
  -        _component.setBinding(_parameterName, binding);
  +        PageLoader.addBindingToComponent(_component, _parameterName, binding);
       }
   }
  \ No newline at end of file
  
  
  
  1.28      +13 -1     jakarta-tapestry/src/documentation/content/xdocs/UsersGuide/spec.xml
  
  Index: spec.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/src/documentation/content/xdocs/UsersGuide/spec.xml,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- spec.xml	20 May 2005 12:46:08 -0000	1.27
  +++ spec.xml	31 May 2005 16:35:11 -0000	1.28
  @@ -140,7 +140,7 @@
     <li>Added the property attribute to the &spec.component; and &spec.bean; elements.</li>
     <li>Removed the type attribute from the &spec.configure; element.</li>
     <li>Added many more options for <link href="#spec.boolean-types">boolean attributes</link>.</li>
  -  <li>Added the cache and default-binding attributes to the &spec.parameter; element.</li>
  +  <li>Added the aliases, cache and default-binding attributes to the &spec.parameter; element.</li>
   </ul>
   
   <p>
  @@ -1355,6 +1355,18 @@
       and cached.
     </td>
   </tr>
  +  
  +<tr>
  +  <td>aliases</td>
  +  <td>string</td>
  +  <td>no</td>
  +  <td/>
  +  <td>
  +    An optional, comma-seperated list of alises for the parameter.  Aliases are used to maintain
  +    backwards compatibility when a parameter name is changed. A parameter may be bound using 
  +    an aliased name, but a warning will be logged.
  +  </td>
  +</tr>
   
   </table>
   
  
  
  
  1.6       +1 -0      jakarta-tapestry/framework/src/test/org/apache/tapestry/junit/parse/Parameter.jwc
  
  Index: Parameter.jwc
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/test/org/apache/tapestry/junit/parse/Parameter.jwc,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Parameter.jwc	2 May 2005 14:18:37 -0000	1.5
  +++ Parameter.jwc	31 May 2005 16:35:11 -0000	1.6
  @@ -26,6 +26,7 @@
       <parameter name="expressionDefault" default-value="ognl:an.expression"/>
       <parameter name="defaultBindingType" default-binding="ognl"/>
       <parameter name="noCache" cache="false"/>
  +    <parameter name="withAliases" aliases="fred,barney"/>
       
   </component-specification>
   
  
  
  
  1.17      +12 -2     jakarta-tapestry/framework/src/test/org/apache/tapestry/junit/parse/TestSpecificationParser.java
  
  Index: TestSpecificationParser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/test/org/apache/tapestry/junit/parse/TestSpecificationParser.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- TestSpecificationParser.java	20 May 2005 12:46:08 -0000	1.16
  +++ TestSpecificationParser.java	31 May 2005 16:35:11 -0000	1.17
  @@ -52,7 +52,7 @@
       }
   
       /**
  -     * Test new (in 3.0) &lt;message-binding&gt; element.
  +     * Test 3.0 &lt;message-binding&gt; element.
        */
   
       public void tesMessageBinding() throws Exception
  @@ -68,7 +68,7 @@
       }
   
       /**
  -     * Tests the new style &lt;binding&gt; element in 4.0 DTD.
  +     * Tests the 4.0 style &lt;binding&gt; element.
        */
   
       public void testBinding40() throws Exception
  @@ -965,12 +965,14 @@
           IParameterSpecification ps = spec.getParameter("noDefault");
   
           assertEquals("noDefault", ps.getPropertyName());
  +        assertEquals("noDefault", ps.getParameterName());
           assertEquals(true, ps.isRequired());
           assertEquals("bar", ps.getType());
           assertNull(ps.getDefaultValue());
           assertNull(ps.getDefaultBindingType());
   
           ps = spec.getParameter("withDefault");
  +        assertEquals("withDefault", ps.getParameterName());
           assertNull(ps.getType());
           assertEquals(false, ps.isRequired());
   
  @@ -1008,6 +1010,7 @@
           assertNull(ps.getDefaultValue());
           assertNull(ps.getDefaultBindingType());
           assertEquals(true, ps.getCache());
  +        assertTrue(ps.getAliasNames().isEmpty());
   
           ps = spec.getParameter("literalDefault");
   
  @@ -1023,6 +1026,13 @@
   
           ps = spec.getParameter("noCache");
           assertEquals(false, ps.getCache());
  +
  +        ps = spec.getParameter("withAliases");
  +        assertListsEqual(new String[]
  +        { "fred", "barney" }, ps.getAliasNames().toArray());
  +
  +        assertSame(ps, spec.getParameter("fred"));
  +        assertSame(ps, spec.getParameter("barney"));
       }
   
       /**
  
  
  
  1.27      +8 -1      jakarta-tapestry/framework/src/java/org/apache/tapestry/parse/SpecificationParser.java
  
  Index: SpecificationParser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/parse/SpecificationParser.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- SpecificationParser.java	12 May 2005 18:18:19 -0000	1.26
  +++ SpecificationParser.java	31 May 2005 16:35:11 -0000	1.27
  @@ -1297,6 +1297,7 @@
           if (propertyName == null)
               propertyName = name;
   
  +        ps.setParameterName(name);
           ps.setPropertyName(propertyName);
   
           ps.setRequired(getBooleanAttribute("required", false));
  @@ -1332,9 +1333,15 @@
           if (type != null)
               ps.setType(type);
   
  +        // aliases is new in the 4.0 DTD
  +
  +        String aliases = getAttribute("aliases");
  +
  +        ps.setAliases(aliases);
  +
           IComponentSpecification cs = (IComponentSpecification) peekObject();
   
  -        cs.addParameter(name, ps);
  +        cs.addParameter(ps);
   
           push(_elementName, ps, STATE_ALLOW_DESCRIPTION);
       }
  
  
  
  1.4       +8 -5      jakarta-tapestry/framework/src/java/org/apache/tapestry/parse/Tapestry_4_0.dtd
  
  Index: Tapestry_4_0.dtd
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/parse/Tapestry_4_0.dtd,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Tapestry_4_0.dtd	12 May 2005 18:18:19 -0000	1.3
  +++ Tapestry_4_0.dtd	31 May 2005 16:35:11 -0000	1.4
  @@ -41,7 +41,7 @@
   - Added property attribute to <component>, <bean> and <asset>
   - Removed the type attribute from the <configure> element
   - Added many alternatives to 'yes' and 'no' for boolean attributes.
  -- Added default-binding and cache attributes to <parameter>
  +- Added aliases, default-binding and cache attributes to <parameter>
   -->
   <!-- =======================================================
   Entity: attribute-flag
  @@ -393,12 +393,14 @@
     property-name: The name to use, instead of the parameter name, for the
       JavaBean property connected to this parameter.
     default-value: Specifies the default value for the parameter, if not bound,
  -  as a binding reference.
  +    as a binding reference.
     default-binding: The default binding type for parameters (when a binding
  -   is specified without a parameter). 
  +    is specified without a parameter). 
     cache: If true (the default), then the parameter property will cache the binding value
  -  If false, then each access to the property will re-acquire the the current value
  -  for the binding on each access (though invariant bindings may still be cached).
  +   If false, then each access to the property will re-acquire the the current value
  +   for the binding on each access (though invariant bindings may still be cached).
  +  aliases: An optional, comma-seperated list of aliases for the parameter. Used to allow
  +    compatibility when parameter names are changed.
   -->
   <!ELEMENT parameter (description?)>
   <!ATTLIST parameter
  @@ -408,6 +410,7 @@
   	default-value CDATA #IMPLIED
     default-binding CDATA #IMPLIED
     cache %attribute-flag; "yes"
  +  aliases CDATA #IMPLIED
   >
   <!-- =======================================================
   Element: property
  
  
  
  1.2       +6 -5      jakarta-tapestry/src/documentation/resources/stylesheets/changes2document.xsl
  
  Index: changes2document.xsl
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/src/documentation/resources/stylesheets/changes2document.xsl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- changes2document.xsl	3 Sep 2004 17:52:51 -0000	1.1
  +++ changes2document.xsl	31 May 2005 16:35:11 -0000	1.2
  @@ -1,19 +1,20 @@
   <?xml version="1.0"?>
  -<!--
  -   Copyright 2004 The Apache Software Foundation
  -  
  +<!-- 
  +   Copyright 2004, 2005 The Apache Software Foundation
  +
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
      You may obtain a copy of the License at
  -  
  +
          http://www.apache.org/licenses/LICENSE-2.0
  -  
  +
      Unless required by applicable law or agreed to in writing, software
      distributed under the License is distributed on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      See the License for the specific language governing permissions and
      limitations under the License.
   -->
  +
   <xsl:stylesheet
       xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
       version="1.0">
  
  
  
  1.32      +5 -3      jakarta-tapestry/contrib/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/contrib/build.xml,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- build.xml	11 May 2005 17:32:21 -0000	1.31
  +++ build.xml	31 May 2005 16:35:11 -0000	1.32
  @@ -28,7 +28,8 @@
   	<import file="${hivebuild.dir}/javadoc-report.xml"/>
   	<import file="${hivebuild.dir}/clover-report.xml"/>  
   	<import file="${hivebuild.dir}/hivedoc-report.xml"/>    
  -  
  +	<import file="${hivebuild.dir}/junit-report.xml"/>    
  +	
   	<target name="compile-dependencies">
       <project-dependency artifact="tapestry"/>
   
  @@ -52,9 +53,10 @@
   	</target>	
     
     <target name="run-reports">
  +    <hivedoc-report/>    	
       <javadoc-report/>
  -	<clover-report/>  	
  -    <hivedoc-report/>    
  +  	<junit-report/>
  +	<clover-report/>  	  
     </target> 
       
   </project>
  
  
  
  1.14      +2 -1      jakarta-tapestry/framework/src/java/org/apache/tapestry/services/impl/ImplStrings.properties
  
  Index: ImplStrings.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/services/impl/ImplStrings.properties,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- ImplStrings.properties	3 Apr 2005 14:50:00 -0000	1.13
  +++ ImplStrings.properties	31 May 2005 16:35:11 -0000	1.14
  @@ -58,4 +58,5 @@
   infrastructure-already-initialized=The Infrastructure service can not be initialized for mode ''{0}'', it has already been initialized for mode ''{1}''.  The Infrastructure may only be initialized once.
   infrastructure-not-initialized=The Infrastructure service has not yet been initialized.
   duplicate-infrastructure-contribution=Infrastructure contribution for property ''{0}'' (mode ''{1}'') conflicts with a prior contribution (at {2}) and has been ignored.
  -missing-infrastructure-property=Infrastructure property ''{0}'' is not defined.
  \ No newline at end of file
  +missing-infrastructure-property=Infrastructure property ''{0}'' is not defined.
  +used-template-parameter-alias=Parameter {2} (for component {1}, at {0}) was bound; this parameter has been deprecated, bind parameter {3} instead.
  
  
  
  1.17      +8 -0      jakarta-tapestry/framework/src/java/org/apache/tapestry/services/impl/ImplMessages.java
  
  Index: ImplMessages.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/services/impl/ImplMessages.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- ImplMessages.java	13 May 2005 13:21:06 -0000	1.16
  +++ ImplMessages.java	31 May 2005 16:35:11 -0000	1.17
  @@ -29,6 +29,7 @@
   import org.apache.tapestry.IComponent;
   import org.apache.tapestry.INamespace;
   import org.apache.tapestry.engine.IEngineService;
  +import org.apache.tapestry.parse.OpenToken;
   import org.apache.tapestry.services.Infrastructure;
   import org.apache.tapestry.spec.IComponentSpecification;
   import org.apache.tapestry.spec.IContainedComponent;
  @@ -262,4 +263,11 @@
       {
           return _formatter.format("missing-infrastructure-property", propertyName);
       }
  +
  +    public static String usedTemplateParameterAlias(OpenToken token, String attributeName,
  +            String parameterName)
  +    {
  +        return _formatter.format("used-template-parameter-alias", new Object[]
  +        { HiveMind.getLocationString(token), token.getType(), attributeName, parameterName });
  +    }
   }
  \ No newline at end of file
  
  
  
  1.9       +15 -5     jakarta-tapestry/framework/src/java/org/apache/tapestry/services/impl/ComponentTemplateLoaderLogic.java
  
  Index: ComponentTemplateLoaderLogic.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/services/impl/ComponentTemplateLoaderLogic.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ComponentTemplateLoaderLogic.java	18 Apr 2005 17:06:38 -0000	1.8
  +++ ComponentTemplateLoaderLogic.java	31 May 2005 16:35:11 -0000	1.9
  @@ -44,6 +44,7 @@
   import org.apache.tapestry.services.TemplateSource;
   import org.apache.tapestry.spec.IComponentSpecification;
   import org.apache.tapestry.spec.IContainedComponent;
  +import org.apache.tapestry.spec.IParameterSpecification;
   
   /**
    * Contains the logic from {@link org.apache.tapestry.services.impl.ComponentTemplateLoaderImpl},
  @@ -261,7 +262,7 @@
        * Adds bindings based on attributes in the template.
        */
   
  -    private void addTemplateBindings(IComponent component, OpenToken token)
  +    void addTemplateBindings(IComponent component, OpenToken token)
       {
           IComponentSpecification spec = component.getSpecification();
   
  @@ -275,10 +276,19 @@
               {
                   Map.Entry entry = (Map.Entry) i.next();
   
  -                String name = (String) entry.getKey();
  +                String attributeName = (String) entry.getKey();
                   String value = (String) entry.getValue();
   
  -                String description = ImplMessages.templateParameterName(name);
  +                IParameterSpecification pspec = spec.getParameter(attributeName);
  +                String parameterName = pspec == null ? attributeName : pspec.getParameterName();
  +
  +                if (!attributeName.equals(parameterName))
  +                    _log.error(ImplMessages.usedTemplateParameterAlias(
  +                            token,
  +                            attributeName,
  +                            parameterName));
  +
  +                String description = ImplMessages.templateParameterName(parameterName);
   
                   // For informal parameters, or formal parameters that don't define a default binding
                   // type,
  @@ -286,7 +296,7 @@
   
                   String defaultBindingType = BindingUtils.getDefaultBindingType(
                           spec,
  -                        name,
  +                        parameterName,
                           BindingConstants.LITERAL_PREFIX);
   
                   IBinding binding = _bindingSource.createBinding(
  @@ -296,7 +306,7 @@
                           defaultBindingType,
                           token.getLocation());
   
  -                addBinding(component, spec, name, binding);
  +                addBinding(component, spec, parameterName, binding);
               }
           }
   
  
  
  
  1.1                  jakarta-tapestry/framework/src/test/org/apache/tapestry/pageload/TestPageLoader.java
  
  Index: TestPageLoader.java
  ===================================================================
  // Copyright 2005 The Apache Software Foundation
  //
  // Licensed under the Apache License, Version 2.0 (the "License");
  // you may not use this file except in compliance with the License.
  // You may obtain a copy of the License at
  //
  //     http://www.apache.org/licenses/LICENSE-2.0
  //
  // Unless required by applicable law or agreed to in writing, software
  // distributed under the License is distributed on an "AS IS" BASIS,
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  // See the License for the specific language governing permissions and
  // limitations under the License.
  
  package org.apache.tapestry.pageload;
  
  import org.apache.commons.logging.Log;
  import org.apache.hivemind.ApplicationRuntimeException;
  import org.apache.hivemind.Location;
  import org.apache.hivemind.test.HiveMindTestCase;
  import org.apache.tapestry.IBinding;
  import org.apache.tapestry.IComponent;
  import org.apache.tapestry.binding.BindingSource;
  import org.apache.tapestry.spec.BindingSpecification;
  import org.apache.tapestry.spec.BindingType;
  import org.apache.tapestry.spec.ComponentSpecification;
  import org.apache.tapestry.spec.ContainedComponent;
  import org.apache.tapestry.spec.IComponentSpecification;
  import org.apache.tapestry.spec.ParameterSpecification;
  import org.easymock.MockControl;
  
  /**
   * Additional tests for {@link org.apache.tapestry.pageload.PageLoader}. Ultimately, testing this
   * beast without the mock unit test suites is going to take a lot of work and refactoring.
   * 
   * @author Howard M. Lewis Ship
   * @since 4.0
   */
  public class TestPageLoader extends HiveMindTestCase
  {
      private IComponentSpecification newSpec(boolean allowInformalParameters)
      {
          MockControl control = newControl(IComponentSpecification.class);
          IComponentSpecification spec = (IComponentSpecification) control.getMock();
  
          spec.getAllowInformalParameters();
          control.setReturnValue(allowInformalParameters);
  
          return spec;
      }
  
      public IComponent newComponent(IComponentSpecification spec)
      {
          MockControl control = newControl(IComponent.class);
          IComponent component = (IComponent) control.getMock();
  
          component.getSpecification();
          control.setReturnValue(spec);
  
          return component;
      }
  
      private IBinding newBinding()
      {
          return (IBinding) newMock(IBinding.class);
      }
  
      private IBinding newBinding(Location l)
      {
          MockControl control = newControl(IBinding.class);
          IBinding binding = (IBinding) control.getMock();
  
          binding.getLocation();
          control.setReturnValue(l);
  
          return binding;
      }
  
      public void testaddDuplicateBindingFails()
      {
          MockControl componentc = newControl(IComponent.class);
          IComponent component = (IComponent) componentc.getMock();
  
          Location l1 = newLocation();
          Location l2 = newLocation();
  
          IBinding oldBinding = newBinding(l1);
          IBinding newBinding = newBinding(l2);
  
          component.getBinding("dupe");
          componentc.setReturnValue(oldBinding);
  
          replayControls();
  
          try
          {
              PageLoader.addBindingToComponent(component, "dupe", newBinding);
              unreachable();
          }
          catch (ApplicationRuntimeException ex)
          {
              assertEquals(
                      "A binding for parameter dupe conflicts with a previous binding (at classpath:/org/apache/tapestry/pageload/TestPageLoader, line 1).",
                      ex.getMessage());
              assertSame(component, ex.getComponent());
              assertSame(l2, ex.getLocation());
          }
      }
  
      public void testBindAlias()
      {
          MockControl containerc = newControl(IComponent.class);
          IComponent container = (IComponent) containerc.getMock();
  
          MockControl componentc = newControl(IComponent.class);
          IComponent component = (IComponent) componentc.getMock();
  
          ParameterSpecification pspec = new ParameterSpecification();
          pspec.setParameterName("fred");
          pspec.setAliases("barney");
  
          Location l = newLocation();
  
          BindingSpecification bspec = new BindingSpecification();
          bspec.setType(BindingType.PREFIXED);
          bspec.setValue("an-expression");
          bspec.setLocation(l);
  
          ContainedComponent contained = new ContainedComponent();
          contained.setBinding("barney", bspec);
          contained.setType("FredComponent");
  
          IComponentSpecification spec = new ComponentSpecification();
          spec.addParameter(pspec);
  
          component.getSpecification();
          componentc.setReturnValue(spec);
  
          Log log = (Log) newMock(Log.class);
  
          log
                  .error("Parameter barney (for component FredComponent, at classpath:/org/apache/tapestry/pageload/TestPageLoader, line 1) was bound; this parameter has been deprecated, bind parameter fred instead.");
  
          IBinding binding = newBinding();
          MockControl sourcec = newControl(BindingSource.class);
          BindingSource source = (BindingSource) sourcec.getMock();
  
          source.createBinding(container, "parameter barney", "an-expression", "ognl", l);
          sourcec.setReturnValue(binding);
  
          component.getBinding("fred");
          componentc.setReturnValue(null);
  
          component.setBinding("fred", binding);
  
          replayControls();
  
          PageLoader loader = new PageLoader();
          loader.setLog(log);
          loader.setBindingSource(source);
  
          loader.bind(container, component, contained);
  
          verifyControls();
      }
  }
  
  
  
  1.1                  jakarta-tapestry/framework/src/test/org/apache/tapestry/pageload/TestVerifyRequiredParametersVisitor.java
  
  Index: TestVerifyRequiredParametersVisitor.java
  ===================================================================
  // Copyright 2005 The Apache Software Foundation
  //
  // Licensed under the Apache License, Version 2.0 (the "License");
  // you may not use this file except in compliance with the License.
  // You may obtain a copy of the License at
  //
  //     http://www.apache.org/licenses/LICENSE-2.0
  //
  // Unless required by applicable law or agreed to in writing, software
  // distributed under the License is distributed on an "AS IS" BASIS,
  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  // See the License for the specific language governing permissions and
  // limitations under the License.
  
  package org.apache.tapestry.pageload;
  
  import org.apache.hivemind.ApplicationRuntimeException;
  import org.apache.hivemind.Location;
  import org.apache.hivemind.test.HiveMindTestCase;
  import org.apache.tapestry.IBinding;
  import org.apache.tapestry.IComponent;
  import org.apache.tapestry.spec.ComponentSpecification;
  import org.apache.tapestry.spec.IComponentSpecification;
  import org.apache.tapestry.spec.ParameterSpecification;
  import org.easymock.MockControl;
  
  /**
   * Tests for {@link org.apache.tapestry.pageload.VerifyRequiredParametersVisitor}.
   * 
   * @author Howard M. Lewis Ship
   * @since 4.0
   */
  public class TestVerifyRequiredParametersVisitor extends HiveMindTestCase
  {
      private IComponent newComponent(IComponentSpecification spec)
      {
          MockControl control = newControl(IComponent.class);
          IComponent component = (IComponent) control.getMock();
  
          component.getSpecification();
          control.setReturnValue(spec);
  
          return component;
      }
  
      private IBinding newBinding()
      {
          return (IBinding) newMock(IBinding.class);
      }
  
      public void testNotRequired()
      {
          ParameterSpecification pspec = new ParameterSpecification();
          pspec.setParameterName("fred");
  
          ComponentSpecification cspec = new ComponentSpecification();
          cspec.addParameter(pspec);
  
          IComponent component = newComponent(cspec);
  
          replayControls();
  
          VerifyRequiredParametersVisitor visitor = new VerifyRequiredParametersVisitor();
  
          visitor.visitComponent(component);
  
          verifyControls();
      }
  
      public void testRequiredWithAlias()
      {
          ParameterSpecification pspec = new ParameterSpecification();
          pspec.setParameterName("fred");
          pspec.setAliases("barney");
          pspec.setRequired(true);
  
          ComponentSpecification cspec = new ComponentSpecification();
          cspec.addParameter(pspec);
  
          IBinding fredBinding = newBinding();
  
          MockControl control = newControl(IComponent.class);
          IComponent component = (IComponent) control.getMock();
  
          component.getSpecification();
          control.setReturnValue(cspec);
  
          // Notice that we don't ever check for "barney", just
          // "fred"
  
          component.getBinding("fred");
          control.setReturnValue(fredBinding);
  
          replayControls();
  
          VerifyRequiredParametersVisitor visitor = new VerifyRequiredParametersVisitor();
  
          visitor.visitComponent(component);
  
          verifyControls();
      }
  
      public void testRequiredNotBound()
      {
          ParameterSpecification pspec = new ParameterSpecification();
          pspec.setParameterName("fred");
          pspec.setRequired(true);
  
          ComponentSpecification cspec = new ComponentSpecification();
          cspec.addParameter(pspec);
  
          Location l = newLocation();
  
          MockControl control = newControl(IComponent.class);
          IComponent component = (IComponent) control.getMock();
  
          component.getSpecification();
          control.setReturnValue(cspec);
  
          component.getBinding("fred");
          control.setReturnValue(null);
  
          component.getExtendedId();
          control.setReturnValue("Fred/flintstone");
  
          component.getLocation();
          control.setReturnValue(l);
  
          replayControls();
  
          VerifyRequiredParametersVisitor visitor = new VerifyRequiredParametersVisitor();
  
          try
          {
              visitor.visitComponent(component);
              unreachable();
          }
          catch (ApplicationRuntimeException ex)
          {
              assertEquals("Required parameter fred of component Fred/flintstone is not bound.", ex
                      .getMessage());
              assertSame(component, ex.getComponent());
              assertSame(l, ex.getLocation());
          }
  
          verifyControls();
      }
  }
  
  
  
  1.49      +4 -2      jakarta-tapestry/framework/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/build.xml,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- build.xml	10 Mar 2005 13:24:37 -0000	1.48
  +++ build.xml	31 May 2005 16:35:11 -0000	1.49
  @@ -30,6 +30,7 @@
     <import file="${hivebuild.dir}/javadoc-report.xml"/>
     <import file="${hivebuild.dir}/clover-report.xml"/>  
     <import file="${hivebuild.dir}/hivedoc-report.xml"/>  
  +  <import file="${hivebuild.dir}/junit-report.xml"/>  
     
     <target name="compile-dependencies">
       <ibiblio-dependency artifact="bsf"                version="${bsf.version}"      group="bsf"/>
  @@ -59,9 +60,10 @@
     </target>	
     
     <target name="run-reports">
  +    <hivedoc-report/>    	
       <javadoc-report/>
  -    <clover-report/>
  -    <hivedoc-report/>    
  +  	<junit-report/>
  +	<clover-report/>  
     </target>
     
     <target name="marshall-documentation">
  
  
  
  1.1                  jakarta-tapestry/.settings/org.eclipse.jdt.ui.prefs
  
  Index: org.eclipse.jdt.ui.prefs
  ===================================================================
  #Thu May 26 12:35:05 EDT 2005
  eclipse.preferences.version=1
  internal.default.compliance=user
  org.eclipse.jdt.ui.exception.name=ex
  org.eclipse.jdt.ui.gettersetter.use.is=true
  org.eclipse.jdt.ui.overrideannotation=true
  
  
  
  1.1                  jakarta-tapestry/.settings/org.eclipse.jdt.core.prefs
  
  Index: org.eclipse.jdt.core.prefs
  ===================================================================
  #Thu May 26 12:35:05 EDT 2005
  eclipse.preferences.version=1
  org.eclipse.jdt.core.codeComplete.argumentPrefixes=
  org.eclipse.jdt.core.codeComplete.argumentSuffixes=
  org.eclipse.jdt.core.codeComplete.fieldPrefixes=_
  org.eclipse.jdt.core.codeComplete.fieldSuffixes=
  org.eclipse.jdt.core.codeComplete.localPrefixes=
  org.eclipse.jdt.core.codeComplete.localSuffixes=
  org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=_
  org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
  org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
  org.eclipse.jdt.core.compiler.problem.assertIdentifier=ignore
  org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
  org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
  org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,NORMAL
  org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX
  
  
  
  1.9       +1 -1      jakarta-tapestry/framework/src/java/org/apache/tapestry/spec/IComponentSpecification.java
  
  Index: IComponentSpecification.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/spec/IComponentSpecification.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- IComponentSpecification.java	12 May 2005 18:18:19 -0000	1.8
  +++ IComponentSpecification.java	31 May 2005 16:35:11 -0000	1.9
  @@ -67,7 +67,7 @@
        * @throws IllegalArgumentException
        *             if the name already exists.
        */
  -    public void addParameter(String name, IParameterSpecification spec);
  +    public void addParameter(IParameterSpecification spec);
   
       /**
        * Returns true if the component is allowed to wrap other elements (static HTML or other
  
  
  
  1.10      +45 -0     jakarta-tapestry/framework/src/java/org/apache/tapestry/spec/ParameterSpecification.java
  
  Index: ParameterSpecification.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/spec/ParameterSpecification.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ParameterSpecification.java	2 May 2005 14:18:37 -0000	1.9
  +++ ParameterSpecification.java	31 May 2005 16:35:11 -0000	1.10
  @@ -14,7 +14,14 @@
   
   package org.apache.tapestry.spec;
   
  +import java.util.Arrays;
  +import java.util.Collection;
  +import java.util.Collections;
  +
  +import org.apache.hivemind.HiveMind;
   import org.apache.hivemind.impl.BaseLocatable;
  +import org.apache.hivemind.util.Defense;
  +import org.apache.tapestry.TapestryUtils;
   
   /**
    * Defines a formal parameter to a component. A <code>IParameterSpecification</code> is contained
  @@ -46,6 +53,12 @@
       /** @since 4.0 */
       private boolean _cache = true;
   
  +    /** @since 4.0 */
  +    private Collection _aliasNames = Collections.EMPTY_LIST;
  +
  +    /** @since 4.0 */
  +    private String _parameterName;
  +
       /**
        * Returns the class name of the expected type of the parameter. The default value is
        * <code>java.lang.Object</code> which matches anything.
  @@ -160,4 +173,36 @@
       {
           _cache = cache;
       }
  +
  +    /** @since 4.0 */
  +    public Collection getAliasNames()
  +    {
  +        return _aliasNames;
  +    }
  +
  +    /** @since 4.0 */
  +    public String getParameterName()
  +    {
  +        return _parameterName;
  +    }
  +
  +    /** @since 4.0 */
  +    public void setAliases(String nameList)
  +    {
  +        if (HiveMind.isNonBlank(nameList))
  +        {
  +            String[] names = TapestryUtils.split(nameList);
  +
  +            _aliasNames = Arrays.asList(names);
  +        }
  +    }
  +
  +    /** @since 4.0 */
  +    public void setParameterName(String name)
  +    {
  +        Defense.notNull(name, "name");
  +
  +        _parameterName = name;
  +    }
  +
   }
  \ No newline at end of file
  
  
  
  1.9       +19 -3     jakarta-tapestry/framework/src/java/org/apache/tapestry/spec/ComponentSpecification.java
  
  Index: ComponentSpecification.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/spec/ComponentSpecification.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ComponentSpecification.java	20 May 2005 12:46:07 -0000	1.8
  +++ ComponentSpecification.java	31 May 2005 16:35:11 -0000	1.9
  @@ -19,6 +19,7 @@
   import java.util.Collections;
   import java.util.HashMap;
   import java.util.HashSet;
  +import java.util.Iterator;
   import java.util.List;
   import java.util.Map;
   import java.util.Set;
  @@ -210,11 +211,28 @@
        *             if the name already exists.
        */
   
  -    public void addParameter(String name, IParameterSpecification spec)
  +    public void addParameter(IParameterSpecification spec)
       {
           if (_parameters == null)
               _parameters = new HashMap();
   
  +        String name = spec.getParameterName();
  +
  +        addParameterByName(name, spec);
  +
  +        Iterator i = spec.getAliasNames().iterator();
  +        while (i.hasNext())
  +        {
  +            String alias = (String) i.next();
  +
  +            addParameterByName(alias, spec);
  +        }
  +
  +        claimProperty(spec.getPropertyName(), spec);
  +    }
  +
  +    private void addParameterByName(String name, IParameterSpecification spec)
  +    {
           IParameterSpecification existing = (IParameterSpecification) _parameters.get(name);
   
           if (existing != null)
  @@ -223,8 +241,6 @@
   
           _parameters.put(name, spec);
   
  -        claimProperty(spec.getPropertyName(), spec);
  -
           addReservedParameterName(name);
       }
   
  
  
  
  1.8       +35 -1     jakarta-tapestry/framework/src/java/org/apache/tapestry/spec/IParameterSpecification.java
  
  Index: IParameterSpecification.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/spec/IParameterSpecification.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- IParameterSpecification.java	2 May 2005 14:18:37 -0000	1.7
  +++ IParameterSpecification.java	31 May 2005 16:35:11 -0000	1.8
  @@ -14,6 +14,8 @@
   
   package org.apache.tapestry.spec;
   
  +import java.util.Collection;
  +
   import org.apache.hivemind.LocationHolder;
   
   /**
  @@ -99,7 +101,7 @@
       public String getDefaultBindingType();
   
       /**
  -     * Returns true if the parameter proeprty should cache the result of the binding.
  +     * Returns true if the parameter property should cache the result of the binding.
        * 
        * @since 4.0
        */
  @@ -110,4 +112,36 @@
   
       public void setCache(boolean cache);
   
  +    /**
  +     * Returns the (primary) name of the parameter.
  +     * 
  +     * @since 4.0
  +     */
  +
  +    public String getParameterName();
  +
  +    /**
  +     * @since 4.0
  +     */
  +
  +    public void setParameterName(String name);
  +
  +    /**
  +     * Returns a non-null collection of strings for the aliases of the parameter. This is usually an
  +     * empty list.
  +     * 
  +     * @since 4.0
  +     */
  +
  +    public Collection getAliasNames();
  +
  +    /**
  +     * Sets the list of aliases as a comma-seperated list.
  +     * 
  +     * @param nameList
  +     *            a comma seperated list of names, which may be null or empty
  +     * @since 4.0
  +     */
  +
  +    public void setAliases(String nameList);
   }
  \ No newline at end of file
  
  
  
  1.6       +8 -6      jakarta-tapestry/portlet/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/portlet/build.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- build.xml	22 Mar 2005 21:54:39 -0000	1.5
  +++ build.xml	31 May 2005 16:35:12 -0000	1.6
  @@ -21,14 +21,15 @@
     <property name="javadoc.package" value="org.apache.tapestry.portlet.*"/>
       
     <property name="root.dir" value=".."/>
  -	<property file="${root.dir}/config/build.properties"/>
  -	<property file="${root.dir}/config/common.properties"/>
  +  <property file="${root.dir}/config/build.properties"/>
  +  <property file="${root.dir}/config/common.properties"/>
     
  -	<import file="${hivebuild.dir}/jar-module.xml"/>
  +  <import file="${hivebuild.dir}/jar-module.xml"/>
     <import file="${hivebuild.dir}/javadoc-report.xml"/>
     <import file="${hivebuild.dir}/clover-report.xml"/>  
     <import file="${hivebuild.dir}/hivedoc-report.xml"/>  
  -  
  +  <import file="${hivebuild.dir}/junit-report.xml"/> 
  +	
   	<target name="compile-dependencies">
       <project-dependency artifact="tapestry"/>
   
  @@ -51,9 +52,10 @@
   	</target>	
     
     <target name="run-reports">
  +    <hivedoc-report/>    	
       <javadoc-report/>
  -    <clover-report/>
  -    <hivedoc-report/>    
  +  	<junit-report/>
  +	<clover-report/>     
     </target>  
     
   </project>
  
  
  
  1.2       +4 -2      jakarta-tapestry/framework/src/test/org/apache/tapestry/spec/TestComponentSpecification.java
  
  Index: TestComponentSpecification.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/test/org/apache/tapestry/spec/TestComponentSpecification.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestComponentSpecification.java	20 May 2005 12:46:08 -0000	1.1
  +++ TestComponentSpecification.java	31 May 2005 16:35:12 -0000	1.2
  @@ -134,18 +134,20 @@
           Location l2 = fabricateLocation(97);
   
           ParameterSpecification p1 = new ParameterSpecification();
  +        p1.setParameterName("dino");
           p1.setLocation(l1);
   
           ParameterSpecification p2 = new ParameterSpecification();
  +        p2.setParameterName("dino");
           p2.setLocation(l2);
   
           ComponentSpecification cs = new ComponentSpecification();
   
  -        cs.addParameter("dino", p1);
  +        cs.addParameter(p1);
   
           try
           {
  -            cs.addParameter("dino", p2);
  +            cs.addParameter(p2);
               unreachable();
           }
           catch (ApplicationRuntimeException ex)
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org