Código:
y el fichero json que me devuelve la url '/AODB2/maintenance/gate/NewGate.action?accion=listar' :jQuery("#listadoGrid").jqGrid({
url:'/AODB2/maintenance/gate/NewGate.action?accion=listar',
datatype: "json",
colNames:['Codigo','Nombre', 'Descripcion', 'Tipo de puerta','Zona','Stand'],
colModel:[
{name:'Codigo',index:'Codigo', width:110, editable:false, editoptions:{readonly:true,size:10}},
{name:'Nombre',index:'Nombre', width:160, editable:true, editoptions:{size:10}},
{name:'Descripcion',index:'Descripcion', width:200, sortable: false, editable: true, edittype:"textarea", editoptions:{rows:"2",cols:"20"}},
{name:'TipoPuerta',index:'TipoPuerta', width:120, align:"right", editable:true, editoptions:{size:10}},
{name:'Zona',index:'Zona',width:110,align:'center',editable:true,edittype:"checkbox",editoptions:{value:"Yes:No"}},
{name:'Stand',index:'Stand', width:120, align:"right", editable:true, editoptions:{size:10}}
],
rowNum:2,
rowList:[2,4,8],
pager: '#pageGrid',
sortname: 'Nombre',
viewrecords: true,
sortorder: "desc",
caption: "Puertas"
//editurl:'/AODB2/maintenance/gate/EditDialogGate.action?', //para el cuadro de dialogo
//height:280 //para el cuadro de dialogo
});
jQuery("#listadoGrid").jqGrid('navGrid','#pageGrid',{edit:false,add:false,del:false});
Código HTML:
<%@ page contentType="text/html; charset=utf-8" %> <%@ taglib uri="/struts-tags" prefix="s" %> <s:set name="theme" value="'simple'" scope="page"/> { "total": "1", "page": "1", "records": "4", "rows" :[ <s:iterator value="%{gateListBck}" status="gateStatus"> { "Codigo":"<s:property value="%{idGateList}"/>", "Nombre":"<s:property value="%{nameList}"/>", "Descripcion":"<s:property value="%{descriptionList}"/>", "TipoPuerta":"<s:property value="%{nameGateTypeList}"/>", "Zona":"<s:property value="%{nameZoneGateList}"/>", "Stand":"<s:property value="%{standCodeList}"/>" } <s:if test="!#gateStatus.last">,</s:if> </s:iterator> ] }
Muchas gracias, un saludo


