grails + jquery grid plugin
Jquery Grid Json 格式方法
http://trirand.com/blog/jqgrid/jqgrid.htmldef listJson = {
def nparams = [:]
if (params) {
nparams['sort'] = params.sidx
nparams['order'] = params.sord
}
def msztzd = Msztzd.list(nparams)
def idCell = []
def rowsR = msztzd.collect { dit ->
[id: dit.fbh,cell:[dit.fbh,dit.fmc,dit.fvision]]
}
response.setHeader("Cache-Control", "no-store")
render(contentType:"text/json") {
total ="1"
page = "1"
rows = array{
for (zt in rowsR) {
row id : zt.id ,cell : zt.cell
}
}
}
}
相关推荐
hooopo 2014-07-12
80447518 2014-06-18
purpen 2014-05-23
jackyzhuyuanlu 2015-02-12
龙浩然 2015-11-06
daociyiyou 2016-11-07
coderbx 2013-03-11
yehell 2012-04-24
yeyedeyatou 2011-08-04
Ben的程序员生涯 2011-04-29
jieren 2010-02-18
carpenterworm 2009-04-03
trapeze 2008-06-06
掘井之路 2019-07-01