On Wed, 28 Nov 2012 13:26:34 -0200, mwrohde <mro...@navicure.com> wrote:
All -
Hi!
We have not been successful in getting image files loaded from the component jar, however. We have tried referencing images through relative path from both tml and css, both to no avail.
In templates and classes, use the Tapestry asset infrastructure. In .tml, use ${classpath:/path/to/file.jpg}. In classes, use @Inject @Path("classpath:/path/to/file.jpg") private Asset asset;. Don't use relative paths on them.
Tapestry itself doesn't provide any way of using ${} expressions in CSS files, but you still can use relative paths for them. Just remember how to use relative paths in CSS, which are relative to where the CSS file is located, not to the page itself.
-- Thiago H. de Paula Figueiredo --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org