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/07/25 15:09:13 UTC

cvs commit: jakarta-tapestry/framework/src/java/org/apache/tapestry AbstractComponent.java IComponent.java

hlship      2005/07/25 06:09:13

  Modified:    .        status.xml project.properties
               framework/src/test/org/apache/tapestry
                        TestAbstractComponent.java
               framework/src/java/org/apache/tapestry
                        AbstractComponent.java IComponent.java
  Log:
  Add getComponent() method to IComponent.
  
  Revision  Changes    Path
  1.173     +3 -0      jakarta-tapestry/status.xml
  
  Index: status.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/status.xml,v
  retrieving revision 1.172
  retrieving revision 1.173
  diff -u -r1.172 -r1.173
  --- status.xml	24 Jul 2005 12:13:33 -0000	1.172
  +++ status.xml	25 Jul 2005 13:09:13 -0000	1.173
  @@ -50,6 +50,9 @@
       -->
     </todo>
     <changes>
  +    <release version="4.0-beta-4" date="unreleased">
  +      <action type="fix" dev="HLS">Add getComponent() method to IComponent.</action>
  +    </release>
       <release version="4.0-beta-3" date="Jul 22 2005">
         <action type="fix" dev="HLS" fixes-bug="TAPESTRY-398" due-to="Jonas Maurus">HiveMind configuration error breaks the useage of the state: binding prefix</action>
         <action type="fix" dev="HLS" fixes-bug="TAPESTRY-405">Submit component should deprecate its label parameter</action>
  
  
  
  1.13      +1 -1      jakarta-tapestry/project.properties
  
  Index: project.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/project.properties,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- project.properties	10 Jul 2005 15:37:44 -0000	1.12
  +++ project.properties	25 Jul 2005 13:09:13 -0000	1.13
  @@ -13,7 +13,7 @@
   # limitations under the License.
   
   project.name=jakarta-tapestry
  -project.version=4.0-beta-3
  +project.version=4.0-beta-4
   
   dist.name=tapestry
   
  
  
  
  1.3       +7 -0      jakarta-tapestry/framework/src/test/org/apache/tapestry/TestAbstractComponent.java
  
  Index: TestAbstractComponent.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/test/org/apache/tapestry/TestAbstractComponent.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- TestAbstractComponent.java	18 Apr 2005 17:07:52 -0000	1.2
  +++ TestAbstractComponent.java	25 Jul 2005 13:09:13 -0000	1.3
  @@ -34,6 +34,13 @@
   
       }
   
  +    public void testGetComponent()
  +    {
  +        IComponent component = new ConcreteComponent();
  +
  +        assertSame(component, component.getComponent());
  +    }
  +
       public void testUnimplementedMethods()
       {
           IComponent component = new ConcreteComponent();
  
  
  
  1.21      +10 -0     jakarta-tapestry/framework/src/java/org/apache/tapestry/AbstractComponent.java
  
  Index: AbstractComponent.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/AbstractComponent.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- AbstractComponent.java	1 Jul 2005 16:41:03 -0000	1.20
  +++ AbstractComponent.java	25 Jul 2005 13:09:13 -0000	1.21
  @@ -832,4 +832,14 @@
           return getMessages().format(key, argument1, argument2, argument3);
       }
   
  +    /**
  +     * Returns this component.
  +     * 
  +     * @since 4.0
  +     */
  +    public final IComponent getComponent()
  +    {
  +        return this;
  +    }
  +
   }
  \ No newline at end of file
  
  
  
  1.14      +26 -0     jakarta-tapestry/framework/src/java/org/apache/tapestry/IComponent.java
  
  Index: IComponent.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/framework/src/java/org/apache/tapestry/IComponent.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- IComponent.java	1 Jul 2005 16:41:03 -0000	1.13
  +++ IComponent.java	25 Jul 2005 13:09:13 -0000	1.14
  @@ -338,4 +338,30 @@
        */
   
       public String getMessage(String key);
  +
  +    /**
  +     * Returns this component. That seems to be a very odd method for a component; it's based on the
  +     * future direction of Tapestry. Currently, the base classes (such as {@link AbstractComponent},
  +     * {@link BaseComponent} and {@link org.apache.tapestry.html.BasePage}) largely provide
  +     * <em>structural concerns</em> such as containing, lifecycle, templates, bindings, and so
  +     * forth. Tapestry users provide subclasses that represent the <em>application concerns</em>:
  +     * properties, (listener) methods and parameters.
  +     * <p>
  +     * This current vision for Tapestry is to split these two concerns into the component and
  +     * <em>the peer</em>. The peer contains the application concerns, the component provides the
  +     * structural concerns. The peer will not have to implement any special interfaces or subclass
  +     * from any special base classes (though there will be some optional interfaces, annotations
  +     * and/or naming conventions). The component will be <em>injected</em> into the peer as this
  +     * property: <code>component</code>.
  +     * <p>
  +     * That means that certain OGNL expression will have to change: For example, "ognl:assets.foo"
  +     * may eventually have to be re-written as "ognl:component.assets.foo". Of course, using
  +     * "asset:foo", or injecting the foo asset as a property, may make it even easier to reference
  +     * the asset. In any case, having this property in place long before the transition should make
  +     * it easier to build applications that can survive the transition unchanged.`
  +     * 
  +     * @since 4.0
  +     */
  +
  +    public IComponent getComponent();
   }
  \ No newline at end of file
  
  
  

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