Closed JurrianFahner closed 7 years ago
In the javadoc about TemplateEngine the following code snippets are published:
final IContext ctx = new Context(); ctx.setVariable("allItems", items);
and
final IContext ctx = new WebContext(request, servletContext); ctx.setVariable("allItems", items);
The problem with this code is that the interface IContext doesn't have the the setVariable and setVariables methods in version 2.1.4.RELEASE.
IContext
setVariable
setVariables
The workaround is to apply (by not programming to an interface):
final Context ctx = new Context(); ctx.setVariable("allItems", items);
So it is not a great problem, anyway...
Looks like it was still a problem in the 3.0 branch too. Fixed to appear in the next patch for the 3.0 and 2.1 branches of Thymeleaf.
In the javadoc about TemplateEngine the following code snippets are published:
and
The problem with this code is that the interface
IContext
doesn't have the thesetVariable
andsetVariables
methods in version 2.1.4.RELEASE.The workaround is to apply (by not programming to an interface):
So it is not a great problem, anyway...