Hello,
I have the following enum
package org.towatch.routes;
public enum Sort {
BEST, POPULAR;
}
So I want to test Sort values in my template in following way:
{% if sortVar == Sort.BEST %}
{% else %}
{% endif %}
But template not recognizes Sort as the class. How to access static java fields and methods from template?
The only way I found is
{% if sortVar == sortVar.BEST %}
{% else %}
{% endif %}
But this is not good code practice.