Javadoc needs an update to match with the published code?
JurrianFahner opened this issue · 1 comments
JurrianFahner commented
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.
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...
ultraq commented
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.