306 Star 866 Fork 262

闲.大赋 / beetl2.0

js 调用后台函数 返回list对象不是字符串json

Backlog
wwm小宝  Opened this issue

调用 @varian fllist=goodsclass.getAllClassList();
for(var i in ${fllist})
使用时候 前端显示是这种
for(var i in [com.binya.web.pagemodel.goods.GoodsClass@495823c6, com.binya.web.pagemodel.goods.GoodsClass@71800973, com.binya.web.pagemodel.goo

29 xiandafu 1578913709 total 2 participants

Comments (1)

29 xiandafu 1578913709
闲.大赋 2017-08-21 11:10 owner

你期望 ${fllist}) 返回什么?从返回结果看,是对的

fllist是个对象,如果你直接输出对象,返回的就是地址,你应该用json工具序列化一下,比如

for(var i in ${json(fllist)})

json函数beetl没有提供,你得自己扩展,或者在后台就转成json传给beetl

Sign in to comment

Assignees
Labels
Not set
Projects
Milestones
Branches
Planed to start
Not set
Planed to end
Not set
Top level
Priority
Java
1
https://gitee.com/xiandafu/beetl2.0.git
git@gitee.com:xiandafu/beetl2.0.git
xiandafu
beetl2.0
beetl2.0

Search