views:

83

answers:

1

We are creating a Tapestry 5 webapp with an external designer creating and maintaining the css-files of the application.

We would like him to be able to make changes to the css-files without the need to change the webapp, prefarably in the configurable path in the filesystem.

So what would the best way to do this with Tapestry 5?

+2  A: 

There is a JIRA for the ability to use a filesystem asset. Someone has posted patches that should let you do it but it hasn't made it into a release yet. If you do that, you could use @IncludeStyleSheet(value={"file:path_to_css_file"}) in your layout template.

An alternate way would be to stream it using a method like this one. The last paragraph suggests that you can include a streamed response in your template so in this case you could do <link rel="stylesheet" type="text/css" href="${externalStylesheet}"/>. Then create a streamed response that reads the stylesheet from a known path on the server. Or you could store it in a blob in the database and stream from there - that way you could also create a page to let the designer upload new versions.

Brian Deterling
Thanks, that helps!
emptyhead