The source of the problem
Today, I used Thymeleaf in SpringBoot to query the data in the database and perform paging. In order to facilitate the use of easyui's datagrid, and create a data grid through a script, an error has been reported: unable to parse the scripting language of the datagrid. After querying the information, the solution is as follows:
The original script is as follows:
<link rel="stylesheet" type="text/css" href="/easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="/easyui/themes/icon.css">
<link rel="stylesheet" type="text/css" href="/easyui/demo.css">
<script type="text/javascript" src="/easyui/jquery.min.js"></script>
<script type="text/javascript" src="/easyui/jquery.easyui.min.js"></script>
<script>
$(function(){
$(function(){
$('#usershow').datagrid({
url: 'user',
rownumbers:true,
pagination:true,
pageSize:2,
pageList:[2,4],
columns: [[
{
field: 'uname', title: '用户名', width: 200,align:'center'},
{
field: 'pwd',title: '密码',width: 200,align:'center'},
{
field: 'phone', title: '手机号', width: 200,align:'center'}
]]
});
});
});
</script>
Questions are as follows:
There was an unexpected error (type=Internal Server Error, status=500).
Could not parse as expression:
" {field: 'uname', title: '用户名', width: 200,align:'center'}, {field: 'pwd',title: '密码',width: 200,align:'center'}, {field: 'phone', title: '手机号', width: 200,align:'center'} " (template: "page" - line 20, col 32)
problem solved:
Adding a th:inline="none" can be solved