java - Stringtemplate compare strings does not work -
can explain why not work ?
stringtemplate query = new stringtemplate("hello " + "$if(param==\"val1\")$" + " works! " + "$endif$ " + "world"); query.setattribute("param", "val1"); system.out.println("result: "+query.tostring());
it throws
eval tree parse error :0:0: unexpected end of subtree @ org.antlr.stringtemplate.language.actionevaluator.ifcondition(actionevaluator.java:815) @ org.antlr.stringtemplate.language.conditionalexpr.write(conditionalexpr.java:99)
st doesn't allow computation in templates. make part of model.
Comments
Post a Comment