Anil
Anil

Reputation: 1765

Freemarker What is the advantage of using TemplateMethodModelEx over TemplateMethodModel

Recently we upgraded to Freemarker 2.3.22. We have implemented TemplateMethodModel interface mutliple times in our product. Now we are getting warnings that TemplateMethodModel is deprecated and consider using TemplateMethodModelEx.

Are there any specific things that can be done using TemplateMethodModelEx only?

Upvotes: 2

Views: 1055

Answers (1)

ddekany
ddekany

Reputation: 31152

The advantage of TemplateMethodModelEx is that it accepts non-String method arguments. TemplateMethodModel has remained from the old times (1.x?) when FreeMarker only had string values.

Upvotes: 5

Related Questions