Adding new variable to ITemplateContext

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Adding new variable to ITemplateContext

tsurdilo
Is it possible to add a new variable in ITemplateContext? (usage, one dialect processor sets a variable which then can be used and evaluated by another).  

With Thymeleaf 2.x I was able to do for example:

arguments.getContext().getVariables().put("mynewVar", "someTestValue");

When using ITemplateContext variables now seem read-only, am I incorrect?

Thanks!

Reply | Threaded
Open this post in threaded view
|

Re: Adding new variable to ITemplateContext

tsurdilo
Answering my own question: vars can be added via IElementTagStructureHandler.setLocalVariable method