Can you call class methods from inside a view page?
Specifically ones that are not passed into the view?
In asp.net MVC I can do this:
<%= SomeClass.FixDateFormat(ViewData.Model.SomeClass.DateCreated) %>
Can you call class methods from inside a view page?
Specifically ones that are not passed into the view?
In asp.net MVC I can do this:
<%= SomeClass.FixDateFormat(ViewData.Model.SomeClass.DateCreated) %>
Here is a universal way to call any static method of any class without need for preliminarily context manipulation:
#set($str='test')##
#set($Base64=$str.class.forName('java.util.Base64'))##
$Base64.getEncoder().encodeToString($str.getBytes('utf8'))