Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose view url to render function in ScriptTemplateView [SPR-13453] #18033

Closed
spring-projects-issues opened this issue Sep 9, 2015 · 1 comment
Closed
Assignees
Labels
in: web type: enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Sep 9, 2015

Sébastien Deleuze opened SPR-13453 and commented

Currently we pass 2 arguments to the script render function: the template content, and the model. The purpose of this improvement is to add an optional 3rd argument, which is the template url. That may be very useful for some use cases (cache management on script side for example).


Issue Links:

  • #19630 Support i18n and nested template loading in ScriptTemplateView render function

Referenced from: commits f3b7e9f

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Sep 9, 2015

Sébastien Deleuze commented

Resolved by commit f3b7e9f.

Important note: this is a seamless change for Nashorn users that can still invoke either render(template, model) or render(template, model, url), but Jython and JRuby are less permissive and make it mandatory to declare the 3 parameters.

As a consequence, Spring 4.2.0/4.2.1 Script templating users with Jython or JRuby should update their render function declaration from render(template, model) to render(template, model, url).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web type: enhancement
Projects
None yet
Development

No branches or pull requests

2 participants