开发者

Tapestry 5, loading css from filesystem

We are creating a Tapestry 5 webapp wit开发者_JAVA技巧h 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?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜