Expecting a string, date or number here, Expression x is instead a freemarker.ext.beans.BooleanModel
来源:互联网 发布:一键锁屏vivo下载软件 编辑:程序博客网 时间:2024/06/03 14:52
此异常的原因是freemarker不支持boolean类型。解决办法有三个:
1、页面将属性转换为字符串:${entity.property?string("true", "false")},例如${user.active?string("true", "false")},后续判断时要注意是判断=="true"
2、将对象的属性的类型改成其它类型,比如数字0、1,字符串等
3、将对象的属性的类型改成freemarker.ext.beans.BooleanModel,这个类型怎么用还没搞明白。
最简单最方便的就是第1种了。
0 0
- Expecting a string, date or number here, Expression x is instead a freemarker.ext.beans.BooleanModel
- Expecting a string, date or number here, Expression x is instead a freemarker.template.TemplateBoole
- Expecting a string, date or number here, Expression x is instead a freemarker.template.TemplateBoole
- Expecting a string, date or number here, Expression jsonlist is instead a freemarker
- test if a string is a number
- expected number,sequence,or string.map evaluated instead of freemarker.template.smplehash
- freemarker.core.NonStringException: Error on line 346, column 109 in post.html Expecting a string, d
- Judge whether a telephone number is right or not
- Here is a riveting caregiver income jobs
- SVN E200009: 'xxx@2x.png': a peg revision is not allowed here
- Ruby:The provided regular expression is using multiline anchors (^ or $), which may present a securi
- Find whether a given number is a power of 4 or not
- CareerCup Find whether a given number is a perfect square or not.(Addition and Subtraction only)
- php编译安装:link: `ext/date/php_date.lo' is not a valid libtool objec
- int() argument must be a string or a number, not 'SimpleLazyObject'
- gpstop failed. (Reason='int() argument must be a string or a number, not 'NoneType'') exiting...
- 异常 int() argument must be a string or a number, not 'ShopCar'
- 水晶报表11.5(Crystal Report) 错误信息: 此处需要有一个数字(A number is required here)
- 使用Genymotion调试出现错误INSTALL_FAILED_CPU_ABI_INCOMPATIBLE解决办法
- svn命令行语句详解
- 用jQuery实现当前页面给菜单导航一个特定样式
- cocos2d自适应
- javascript中数组对象的unshift()方法
- Expecting a string, date or number here, Expression x is instead a freemarker.ext.beans.BooleanModel
- javascript中数组对象的slice()方法
- 绝对定位如何百分百宽
- 一波三折的proguard
- android Viewpager
- javascript中全局对象的parseInt() 方法
- 进程和线程
- iBatis开发的一个应用
- javascript中全局对象的isNaN()方法