开发者

include views vs render templates in grails

开发者_C百科

What is the technical differences between render a template and include a view in grails?


You generally render a template (from a controller) as part of an AJAX request when you're updating only part of a page. I don't know what you mean by 'include a view'. If you mean render a template from a GSP then it's generally just a convenient way of reusing pieces of your presentation within a view.

So if I have a template that contains a login form, I may want to include that template in several different layouts/pages.

If I have a template that contains search results I may want to render the template from a controller in response to an AJAX request that occurs when the user scrolls to the end of my current set of results or the user updates some search criteria.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜