FreeMarker boolean Issue

rgqancy發表於2016-03-31

FreeMarker template error:
Can't convert boolean to string automatically, because the "boolean_format" setting was "true,false", which is the legacy default computer-language format, and hence isn't accepted.

----
Tip: If you just want "true"/"false" result as you are generting computer-language output, use "?c", like ${myBool?c}.
----
Tip: You can write myBool?string('yes', 'no') and like to specify boolean formatting in place.
----
Tip: If you need the same two values on most places, the programmers should set the "boolean_format" setting to something like "yes,no".
----

----
FTL stack trace ("~" means nesting-related):
- Failed at: ${isCopanyUser} [in template "sys_page/company_new/patent/register.html" at line 95, column 79]
----

沒有什麼比FreeMarker的提示更清楚的了。boolean_format在哪裡配置,待查手冊?

相關文章