You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Chris Lewis <ch...@bellsouth.net> on 2007/08/08 17:09:07 UTC
T5: component libraries
Hello all,
In tap 4 it was possible to bundle/include external libraries; create
the classes/assets/templates/spec files in a package, give it a library
descriptor, drop it in the class path, and finally declare a reference
to it in the app descriptor. Lots of steps, but possible.
In tap 5 components must live in the components package under the app
namespace. Don't get me wrong I much prefer convention over
configuration, but is it still possible to declare/include 3rd party
component libraries? If so, how?
thanks!
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T5: component libraries
Posted by Adam Zimowski <zi...@gmail.com>.
Sorry, wrong thread. My apology.
On 8/11/07, Adam Zimowski <zi...@gmail.com> wrote:
> When can we expect this book to hit the stores???
>
> On 8/8/07, Ognen Ivanovski <og...@netcetera.com.mk> wrote:
> >
> > On 2007-08-08, at 18:05, Chris Lewis wrote:
> >
> > > I've read it and am reading it again, but where did you read about
> > > that specific service?
> >
> > Ah, the service :)
> >
> > The sources. First thing I wanted to know is how to do component
> > libraries, so I dug around until I found it.
> >
> > --
> > Ognen Ivanovski | ognen.ivanovski@netcetera.com.mk
> > phone +389 -2- 30 64 532 | fax +389 -2- 30 79 495
> > Netcetera | 1000 Skopje | Macedonia | http://netcetera.com.mk
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> > For additional commands, e-mail: users-help@tapestry.apache.org
> >
> >
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T5: component libraries
Posted by Adam Zimowski <zi...@gmail.com>.
When can we expect this book to hit the stores???
On 8/8/07, Ognen Ivanovski <og...@netcetera.com.mk> wrote:
>
> On 2007-08-08, at 18:05, Chris Lewis wrote:
>
> > I've read it and am reading it again, but where did you read about
> > that specific service?
>
> Ah, the service :)
>
> The sources. First thing I wanted to know is how to do component
> libraries, so I dug around until I found it.
>
> --
> Ognen Ivanovski | ognen.ivanovski@netcetera.com.mk
> phone +389 -2- 30 64 532 | fax +389 -2- 30 79 495
> Netcetera | 1000 Skopje | Macedonia | http://netcetera.com.mk
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T5: component libraries
Posted by Ognen Ivanovski <og...@netcetera.com.mk>.
On 2007-08-08, at 18:05, Chris Lewis wrote:
> I've read it and am reading it again, but where did you read about
> that specific service?
Ah, the service :)
The sources. First thing I wanted to know is how to do component
libraries, so I dug around until I found it.
--
Ognen Ivanovski | ognen.ivanovski@netcetera.com.mk
phone +389 -2- 30 64 532 | fax +389 -2- 30 79 495
Netcetera | 1000 Skopje | Macedonia | http://netcetera.com.mk
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T5: component libraries
Posted by Chris Lewis <ch...@bellsouth.net>.
I've read it and am reading it again, but where did you read about that
specific service?
Ognen Ivanovski wrote:
>
> On 2007-08-08, at 17:31, Chris Lewis wrote:
>
>> Not sure I agree with that! Thank you very much for showing how its
>> done. Is there discussion on the website about the method
>> "contributeComponentClassResolver", for the service that it seems to
>> imply (ComponentClassResolver)?
>
> Yes, you have to read the docs on
> http://tapestry.apache.org/tapestry5/tapestry-ioc/ in order to see how
> services are declared, wired up and contributed to. After you go
> through it, the example I gave will look quite obvious [you have to
> know the conventions in order for them to work].
>
>
>> thanks again
>
> No prob.
>
> --
> Ognen Ivanovski | ognen.ivanovski@netcetera.com.mk
> phone +389 -2- 30 64 532 | fax +389 -2- 30 79 495
> Netcetera | 1000 Skopje | Macedonia | http://netcetera.com.mk
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T5: component libraries
Posted by Ognen Ivanovski <og...@netcetera.com.mk>.
On 2007-08-08, at 17:31, Chris Lewis wrote:
> Not sure I agree with that! Thank you very much for showing how its
> done. Is there discussion on the website about the method
> "contributeComponentClassResolver", for the service that it seems
> to imply (ComponentClassResolver)?
Yes, you have to read the docs on http://tapestry.apache.org/
tapestry5/tapestry-ioc/ in order to see how services are declared,
wired up and contributed to. After you go through it, the example I
gave will look quite obvious [you have to know the conventions in
order for them to work].
> thanks again
No prob.
--
Ognen Ivanovski | ognen.ivanovski@netcetera.com.mk
phone +389 -2- 30 64 532 | fax +389 -2- 30 79 495
Netcetera | 1000 Skopje | Macedonia | http://netcetera.com.mk
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T5: component libraries
Posted by Chris Lewis <ch...@bellsouth.net>.
"And you are done. Can't be simpler ;) "
Not sure I agree with that! Thank you very much for showing how its
done. Is there discussion on the website about the method
"contributeComponentClassResolver", for the service that it seems to
imply (ComponentClassResolver)?
thanks again
Ognen Ivanovski wrote:
>
> On 2007-08-08, at 17:09, Chris Lewis wrote:
>
>> Don't get me wrong I much prefer convention over configuration, but
>> is it still possible to declare/include 3rd party component
>> libraries? If so, how?
>
> Step 1: Declare the module builder class in the MANIFEST.MF if your
> component library jar. It should look like:
>
> Tapestry-Module-Classes: org.example.mylib.LibModule
>
> (how to do that:
> http://tapestry.apache.org/tapestry5/tapestry-ioc/module.html)
>
> Step 2: have the packages
>
> org.example.mylib.components
> org.example.mylib.base (optional)
> org.example.mylib.pages (optional)
>
> ready.
>
> Step 3: In org.example.mylib.LibModule have the following method:
>
> public void
> contributeComponentClassResolver(Configuration<LibraryMapping> config) {
> config.add(new LibraryMapping("mylib", "org.example.mylib"));
> }
>
> And you are done. Can't be simpler ;)
>
> --
> Ognen Ivanovski | ognen.ivanovski@netcetera.com.mk
> phone +389 -2- 30 64 532 | fax +389 -2- 30 79 495
> Netcetera | 1000 Skopje | Macedonia | http://netcetera.com.mk
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: T5: component libraries
Posted by Ognen Ivanovski <og...@netcetera.com.mk>.
On 2007-08-08, at 17:09, Chris Lewis wrote:
> Don't get me wrong I much prefer convention over configuration, but
> is it still possible to declare/include 3rd party component
> libraries? If so, how?
Step 1: Declare the module builder class in the MANIFEST.MF if your
component library jar. It should look like:
Tapestry-Module-Classes: org.example.mylib.LibModule
(how to do that: http://tapestry.apache.org/tapestry5/tapestry-ioc/
module.html)
Step 2: have the packages
org.example.mylib.components
org.example.mylib.base (optional)
org.example.mylib.pages (optional)
ready.
Step 3: In org.example.mylib.LibModule have the following method:
public void contributeComponentClassResolver
(Configuration<LibraryMapping> config) {
config.add(new LibraryMapping("mylib", "org.example.mylib"));
}
And you are done. Can't be simpler ;)
--
Ognen Ivanovski | ognen.ivanovski@netcetera.com.mk
phone +389 -2- 30 64 532 | fax +389 -2- 30 79 495
Netcetera | 1000 Skopje | Macedonia | http://netcetera.com.mk
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org