You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Bryan Dotzour <BD...@widen.com> on 2005/09/12 15:33:53 UTC

getting a ContextAsset programmatically

Our Border component takes an argument that is a String which contains
the relative path to a CSS file.  This enables us to override the style
of the page, without using different border components in different
areas of the app.  In Tapestry 3, we were able to get that String and do
the following to get the ContextAsset:
 
ContextAsset ca = new ContextAsset(new
ContextResourceLocation(getPage().getRequestCycle().getRequestContext().
getServlet().getServletContext(), getAlternateStylesheetPath()), null);
 
 
How would one go about trying to do this in Tapestry 4?