You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Otry Itrch <ot...@gmail.com> on 2007/09/16 23:22:25 UTC
Packaging custom components
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?