开发者

How do I use data stored in a Blob as a view?

We're currently doing a project that accepts user-provided html and has our own injected into it. This perfectly matches Play's abilities. However, I am at a loss as to how to use dynamic content as a view template without manual intervent开发者_开发百科ion. It seemed best to use a blob to store the information (given that there could be thousands of templates) and somehow load that way.

Any suggestions?

Thanks in advance.


If you really want to do this (I’m not convinced this is a good idea), have a look at the implementation of play.mvc.Controller.renderTemplate(String, Map<String,Object>) in the Play source, to see code that loads a template, binds variables and renders the template.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜