jQuery EasyUI Extension - DWR Loader (DWR Loader)
jQuery EasyUI Extension
Include the 'dwrloader.js' file
To use DWR to fetch data, first include the 'dwrloader.js' file.
Assign the DWR method to the 'url' property
As the default JSON loader, the 'url' property indicates the remote URL from which to fetch JSON data.
When using the DWR loader, we should assign a function to the 'url' property to fetch data from DWR.
The following example demonstrates how to display a datagrid using the DWR loader:
$(function(){
$('#dg').datagrid({
columns: [[
{field:"id",title:'ID',width:80},
{field:"text",title:'Text',width:100}
]],
singleSelect: true,
autoRowHeight: false,
width: 200,
height: 200,
url: MyTest.getDataGridData
});
});
Java test code
public class Test {
public List
Download the jQuery EasyUI example
jQuery EasyUI Extension