Caused by: org.thymeleaf.exceptions.TemplateProcessingException: Could not parse as expression

Caused by: org.thymeleaf.exceptions.TemplateProcessingException: Could not parse as expression:

错误如下:

Caused by: org.thymeleaf.exceptions.TemplateProcessingException: Could not parse as expression: "
                {field: 'subNumber', title: '拆分下级合同编号', width: '150'}
                , {field: 'subAgentName', title: '拆分下级经销商名称', width: '180'}
                , {field: 'number', title: '合同编号', width: '150'}
                , {field: 'productName', title: '产品名称', width: '310'}
                , {field: 'version', title: '版本', width: '100'}
                , {field: 'count', title: '拆分数量', width: '100'}
                , {field: 'orderByName', title: '操作人', width: '150'}
                , {field: 'createDate', title: '创建时间', width: '170'}
                , {fixed: 'right', width: 90, align: 'center', toolbar: '#barDemo'}
            " (template: "split_record" - line 135, col 23)
	at org.thymeleaf.standard.expression.StandardExpressionParser.parseExpression(StandardExpressionParser.java:131)
	at org.thymeleaf.standard.expression.StandardExpressionParser.parseExpression(StandardExpressionParser.java:62)
	at org.thymeleaf.standard.expression.StandardExpressionParser.parseExpression(StandardExpressionParser.java:44)
	at org.thymeleaf.engine.EngineEventUtils.parseAttributeExpression(EngineEventUtils.java:220)
	at org.thymeleaf.engine.EngineEventUtils.computeAttributeExpression(EngineEventUtils.java:207)
	at org.thymeleaf.standard.processor.AbstractStandardExpressionAttributeTagProcessor.doProcess(AbstractStandardExpressionAttributeTagProcessor.java:125)
	at org.thymeleaf.processor.element.AbstractAttributeTagProcessor.doProcess(AbstractAttributeTagProcessor.java:74)
	at org.thymeleaf.processor.element.AbstractElementTagProcessor.process(AbstractElementTagProcessor.java:95)
	at org.thymeleaf.util.ProcessorConfigurationUtils$ElementTagProcessorWrapper.process(ProcessorConfigurationUtils.java:633)
	at org.thymeleaf.engine.ProcessorTemplateHandler.handleOpenElement(ProcessorTemplateHandler.java:1314)
	at org.thymeleaf.engine.OpenElementTag.beHandled(OpenElementTag.java:205)

解决方案:

因为[[]]之间的表达式在thymeleaf被认为是内联表达式,所以渲染错误......
, cols: [[
                {field: 'subNumber', title: '拆分下级合同编号', width: '150'}
                , {field: 'subAgentName', title: '拆分下级经销商名称', width: '180'}
                , {field: 'number', title: '合同编号', width: '150'}
                , {field: 'productName', title: '产品名称', width: '310'}
                , {field: 'version', title: '版本', width: '100'}
                , {field: 'count', title: '拆分数量', width: '100'}
                , {field: 'orderByName', title: '操作人', width: '150'}
                , {field: 'createDate', title: '创建时间', width: '170'}
                , {fixed: 'right', width: 90, align: 'center', toolbar: '#barDemo'}
            ]]
----------------------------------修改为---------------------------------------------  
, cols: [
                [
                    {field: 'subNumber', title: '拆分下级合同编号', width: '150'}
                    , {field: 'subAgentName', title: '拆分下级经销商名称', width: '180'}
                    , {field: 'number', title: '合同编号', width: '150'}
                    , {field: 'productName', title: '产品名称', width: '310'}
                    , {field: 'version', title: '版本', width: '100'}
                    , {field: 'count', title: '拆分数量', width: '100'}
                    , {field: 'orderByName', title: '操作人', width: '150'}
                    , {field: 'createDate', title: '创建时间', width: '170'}
                    , {fixed: 'right', width: 90, align: 'center', toolbar: '#barDemo'}
                ]
            ]
  • 4
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 4
    评论
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值