You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by Masataka Kurihara <ku...@gluegent.com> on 2004/03/23 08:12:03 UTC

make PageLoader's private-method protected

Hello,

I am trying to set components on the original IoC-Container
called 'Seasar' to Tapestry pages and JWC-component-objects.
But org.apache.tapestry.pageload.PageLoader's instantiatePage(...)
and instantiateComponent(...) are private method. 
I hope that these private methods to change into protected in 
the next release.

Because....
Seasar has Type2 and init-method style (and Type3) component
instanciate functions already, and these functions will have
been apply to outer components like JWC-component-objects on
Seasar's next version. See below,

public interface S2Container {
  public injectDependency(Object outer, Class componentClass)
  public injectDependency(Object outer, String componentName)
}

'S2Container' is next version's interface which omited exceptions
and many other methods from Seasar. 'injectDependency(*)' method
inject components on S2Container to an 'outer' Java objects.
I intended to override Tapestry's PageLoader (and PageSource)
like below,

IPage page = (IPage)super.instantiatePage(...) ;
_container.injectDependency(page, pageName);
return page;

and container configuration sample is

<components>
  <component name="home" instance="injection">
    <property name="dataSource">
      <component
        class="org.seasar.extension.dbcp.impl.XADataSourceImpl">
        <property name="driverClassName">
          'oracle.jdbc.driver.OracleDriver'
        </property>
        <property name="URL">
          'jdbc:oracle:thin:@isid00845:1521:ark'
        </property>
      </component>
    </property>
    <initMethod name="init">
      <arg>true</arg>
    </init>
    <aspect pointcut="click">traceAdvice</aspect>
</components>

so, 'home' page-object is set 'dataSource' property and is
called 'init(true)'. Additionally, home's 'click(IRequestCycle)'
method is made pointcut for 'traceAdvice' with AOP. 

By the way, I have seen Tapestry's roadmap in the Wiki. I heared
that Tapestry3.1 or later will be refacterd by using HiveMind.
Could you think about another component containers like
JBoss-AOP, Spring Framework, PicoContainer ...and Seasar?

if you are interested, download the latest Seasar from SourceForge.JP
(sorry, there is no english version service, but this software
has i18n functions). 
http://prdownloads.sourceforge.jp/seasar/8807/S2-RC1.jar

Thanks for all,
Masataka Kurihara.




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


Re: make PageLoader's private-method protected

Posted by Masataka Kurihara <ku...@gluegent.com>.
Hi,

  Would you change PageLoader's instantiatePage(...)
and instantiateComponent(...) into protected methods?
or there is another plan?

Thanks,
Masataka.

> Hello,
> 
> I am trying to set components on the original IoC-Container
> called 'Seasar' to Tapestry pages and JWC-component-objects.
> But org.apache.tapestry.pageload.PageLoader's instantiatePage(...)
> and instantiateComponent(...) are private method. 
> I hope that these private methods to change into protected in 
> the next release.
> 
> Because....
> Seasar has Type2 and init-method style (and Type3) component
> instanciate functions already, and these functions will have
> been apply to outer components like JWC-component-objects on
> Seasar's next version. See below,
> 
> public interface S2Container {
>   public injectDependency(Object outer, Class componentClass)
>   public injectDependency(Object outer, String componentName)
> }
> 
> 'S2Container' is next version's interface which omited exceptions
> and many other methods from Seasar. 'injectDependency(*)' method
> inject components on S2Container to an 'outer' Java objects.
> I intended to override Tapestry's PageLoader (and PageSource)
> like below,
> 
> IPage page = (IPage)super.instantiatePage(...) ;
> _container.injectDependency(page, pageName);
> return page;
> 
> and container configuration sample is
> 
> <components>
>   <component name="home" instance="injection">
>     <property name="dataSource">
>       <component
>         class="org.seasar.extension.dbcp.impl.XADataSourceImpl">
>         <property name="driverClassName">
>           'oracle.jdbc.driver.OracleDriver'
>         </property>
>         <property name="URL">
>           'jdbc:oracle:thin:@isid00845:1521:ark'
>         </property>
>       </component>
>     </property>
>     <initMethod name="init">
>       <arg>true</arg>
>     </init>
>     <aspect pointcut="click">traceAdvice</aspect>
> </components>
> 
> so, 'home' page-object is set 'dataSource' property and is
> called 'init(true)'. Additionally, home's 'click(IRequestCycle)'
> method is made pointcut for 'traceAdvice' with AOP. 
> 
> By the way, I have seen Tapestry's roadmap in the Wiki. I heared
> that Tapestry3.1 or later will be refacterd by using HiveMind.
> Could you think about another component containers like
> JBoss-AOP, Spring Framework, PicoContainer ...and Seasar?
> 
> if you are interested, download the latest Seasar from SourceForge.JP
> (sorry, there is no english version service, but this software
> has i18n functions). 
> http://prdownloads.sourceforge.jp/seasar/8807/S2-RC1.jar
> 
> Thanks for all,
> Masataka Kurihara.
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org




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