Dear Wiki user, You have subscribed to a wiki page or wiki category on "Tapestry Wiki" for change notification.
The "Tapestry5HowToCreateYourOwnComponentLibrary" page has been changed by LeonardLu. http://wiki.apache.org/tapestry/Tapestry5HowToCreateYourOwnComponentLibrary?action=diff&rev1=2&rev2=3 -------------------------------------------------- 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. A Tapestry IOC module that contributes to the [[http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry5/services/ComponentClassResolver.html|ComponentClassResolver]] T5 service (see [[http://tapestry.apache.org/tapestry5/apidocs/org/apache/tapestry5/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]] + * 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/autoload.html|Auto-loading modules in Tapestry IOC]] = Example = TODO --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
