I am trying to repeat what Ted has done in his FCKEditor and
DatePicker to package my own custom components:

1. I created a couple of components, they work fine in the project
where they are created.
2. I packaged everything used by these components into a JAR with structure like

com.myserver.myapp.LibModule
com.myserver.myapp.components.*
com.myserver.myapp.util.*
com.myserver.myapp.services.*

3. In the com.myserver.myapp.LibModule I included the following:

public static void
contributeComponentClassResolver(Configuration<LibraryMapping>
configuration) {
        configuration.add(new LibraryMapping("mylib", "com.myserver.myapp"));
    }

4. I made sure that the manifest of the JAR contains this line:

Tapestry-Module-Classes: com.myserver.myapp.LibModule

However, when I dropped the resulting JAR into a lib directory of
another project and tried to use one of the custom components like

<span t:type="mylib/MyComponent"/>

I got an exception:

Unable to resolve component type 'mylib/MyComponent' to a component
class name. Available component types...

Where I am wrong then?

On 9/17/07, Fernando Padilla <[EMAIL PROTECTED]> wrote:
> Cool.
>
> So how would I go about creating a component library and including its
> use in my app?
>
> Thiago H. de Paula Figueiredo wrote:
> > Em Sun, 16 Sep 2007 21:41:53 -0300, Fernando Padilla <[EMAIL PROTECTED]>
> > escreveu:
> >
> >> I thought I meant Component Libraries.. as in user or third party
> >> generated component libraries.. any other ideas?
> >
> > Tapestry 5 is very young yet (it's not even beta!), so developers hadn't
> > had much time to write component libraries like Tapestry's 4 Tacos. :)
> > There are some components (a date picker and some other I can't recall
> > now) and HiberTapestry, my very own Tapestry-IoC-Hibernate integration
> > (annotation and method-based transaction handling included):
> > http://tapestry-mine.sourceforge.net/hibertapestry/.
> >
> > Thiago
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

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

Reply via email to