Dear Wiki user, You have subscribed to a wiki page or wiki category on "Tapestry Wiki" for change notification.
The following page has been changed by PhilipLopez: http://wiki.apache.org/tapestry/Tapestry5HowToCreateYourOwnComponentLibrary The comment on the change is: initial version (quick reference) New page: One of the great thing about Tapestry is that it encourages the creation of components that can be reused between pages. Some components are so useful that they can reused between applications inside a '''component library''' JAR file. This page describes the steps to do this. = Basic requirements (quick reference) = 1. A JAR file with a package hierarchy that Tapestry expects, e.g. <packagePrefix>.[components,pages,mixins,base] 1. Create Tapestry components as you usually would, just in the JAR instead (hint: put your templates in the packages themselves, e.g. src/main/resources if using Maven2) 1. A Tapestry IOC module that contributes to the [http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry/services/ComponentClassResolver.html ComponentClassResolver] T5 service (see [http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry/services/TapestryModule.html#contributeComponentClassResolver(org.apache.tapestry.ioc.Configuration) TapestryModule]) - this can be either in the JAR (library) file or in your application's module (AppModule.java by default). You will need to use a ''prefix'' and ''root package.'' 1. Include the JAR in your project's dependencies. 1. Reference the component in your application (typically WAR) using the aforementioned ''prefix'' as a "pseudo-package" name. If you use @Component in your page/component class, then simply import the correct class from your JAR, and use t:id in your template. If you prefer to specify the component type in your template (.tml), then use either <t:''<prefix>''.''<componentPath>'' ... /> or <span t:type="''<prefix>/''<componentPath>''" ... />. = Notes = * Tapestry IOC allows libraries to automatically contribute to the framework at application start time. To do this, use the Tapestry-Module-Classes entry in the JAR's MANIFEST.MF file, e.g. via the maven-jar-plugin. See [http://tapestry.apache.org/tapestry5/tapestry-ioc/module.html#Autoloading%20modules Auto-loading modules in Tapestry IOC] = Example = TODO --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
