Expose view url to render function in ScriptTemplateView

After this change, with Nashorn it is possible to use either
render(template, model) or render(template, model, url).
With JRuby or Jython, specifying the 3 parameters is mandatory.

Issue: SPR-13453
This commit is contained in:
Sebastien Deleuze
2015-09-09 18:05:04 +02:00
parent ff02ad47e0
commit f3b7e9ff2d
7 changed files with 46 additions and 17 deletions

View File

@@ -1589,8 +1589,9 @@ And the Mustache template is:
The render function is called with the following parameters:
* template: the view template content (String)
* model: the view model (Map)
* `String template`: the template content
* `Map model`: the view model
* `String url`: the template url (since 4.2.2)
`Mustache.render()` is natively compatible with this signature, so you can call it directly.