Freemarker "Expected a number or boolean, but this has evaluated to a method+sequence"
Depends on how does the Java API of unitObj
look like. Also, your problem is not related to ?c
, it's simply that you don't get a boolean value before it.
If you have boolean isApprove()
there, then you should write unitObj.approvate
, to get the boolean value (and after that you can put ?c
of course).
If you have Boolean isApprove()
, then that's not a valid Java Bean property getter, and it should be renamed to Boolean getApprove()
in Java. If that can't be fixed, then you can refer to the isApprove
method itself, but then it also has to be called to get the boolean value: unitObj.isApprove()
.