Hi Jim,

Thanks for replying. But isn't it possible to configure this just
using hivemodule.xml without having to create the classes you've
mentioned? Since I'm still new to this and do not have any idea how
would the class look like.

Thanks

On 11/13/07, Jim <[EMAIL PROTECTED]> wrote:
> Tapestry's HiveMind configuration provides two service points that can
> be implemented: tapestry.page.SpecificationResolverDelegate (to find
> page/component specifications), and
> tapestry.parse.TemplateSourceDelegate (to find page/component
> templates).  Implementations of ISpecificationResolverDelegate and
> ITemplateSourceDelegate, respectively, can be plugged into these
> service-points.
>
> So I created a drop-in JAR with:
>  1.  My own implementation of ISpecificationResolverDelegate
>  2.  My own implementation of ITemplateSourceDelegate
>  3.  META-INF/hivemodule.xml to tell HiveMind how to plug those
> implementations into Tapestry's configuration.
>
>
> Here's my slightly-censored hivemodule.xml:
>
> <module id="com.company...ModuleName"
>    version="1.0.0" package="com.company...">
>  <implementation service-id="tapestry.page.SpecificationResolverDelegate">
>    <invoke-factory>
>      <construct class="SpecificationResolverDelegate">
>        <set-object property="context"
> value="service:tapestry.globals.WebContext" />
>      </construct>
>    </invoke-factory>
>  </implementation>
>
>  <implementation service-id="tapestry.parse.TemplateSourceDelegate">
>    <invoke-factory>
>      <construct class="com.company...TemplateSourceDelegate">
>        <set-object property="context"
> value="service:tapestry.globals.WebContext" />
>        <set-object property="parser"
> value="service:tapestry.parse.TemplateParser" />
>        <set-object property="resolver"
> value="service:tapestry.page.ComponentSpecificationResolver" />
>      </construct>
>    </invoke-factory>
>  </implementation>
> </module>
>
>
> As for the implementations, I just used modified copies of Tapestry's
> default implementations.  I inject the WebContext not just so I can
> create filepaths relative from the deployed application, but also so I
> can specify the paths for my templates/specifications via
> init-parameters in my web.xml, making the module useful in multiple web
> applications.  You can also create default specifications on the fly if
> a specification file isn't found; by requiring specific conventions, you
> can code your implementations in such a way that *.jwc and *.page files
> need not exist.  The implementations that ship with Tapestry should give
> you a pretty good idea as to how you can work in your own behavior.
>
> Jim
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
What you want today, may not exist tommorrow

Blog: http://joshuajava.wordpress.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to