I just noticed this:
@Contribute(MarkupRenderer.class)
public void provideMarkupRenderer(
OrderedConfiguration<MarkupRendererFilter> configuration,
final AssetSource assetSource,
final ThreadLocale threadLocale,
final Environment environment)
{
MarkupRendererFilter importKaptchaCss = new MarkupRendererFilter()
{
public void renderMarkup(MarkupWriter writer,
MarkupRenderer renderer)
{
JavaScriptSupport javaScriptSupport =
environment.peek(JavaScriptSupport.class);
Asset css = assetSource.getAsset(null,
"org/apache/tapestry5/kaptcha/kaptcha.css",
threadLocale.getLocale());
javaScriptSupport.importStylesheet(css);
renderer.renderMarkup(writer);
}
};
configuration.add("KaptchaAssets", importKaptchaCss, "after:*");
}
I don't see why the Kaptcha components don't just use the @Import annotation.
This appears to add the kaptcha.css to all pages, not just pages using
a Kaptcha component.
--
Howard M. Lewis Ship
Creator of Apache Tapestry
The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!
(971) 678-5210
http://howardlewisship.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]