I’m startet writing my first UIExtension Java Component and have problems to return its execute result as a rendered Velocity template:
\src\main\resources\templates\view.vm <- Velocity template with test content
@Override
public Block execute() {
return templateManager.renderNoException(“templates/view.vm”);
}
I tested the code above but templateManager.renderNoException returns an empty string without any exception or indication what the problem is.
Question 1: Is this the official way to use a velocity template within a Java component?
Question 2: How do I inject Java variable values to use them in the velocity template?