Código PHP:
Ver originalpublic function getallperrevdropAction()
{
$allDropperrev = new Biv_Models_Perrev_Utmach();
$dataStore = new Zend_Dojo_Data('utm_per_codigo',$allDropperrev->getallDropperrrev());
$json = new Zend_Json();
echo $json->encode($dataStore);
}
Código Javascript
:
Ver originalfunction droploadPerrev() {
dojo.xhrPost({
handleAs : "json",
url : "/bibliotecav/public/admin/getallperrevdrop",
load : function(response, ioArgs)
{
var newStore = new dojo.data.ItemFileReadStore({data:response});
dijit.byId("dropPerrev").setStore(newStore);
return response;
},
error : function(response, ioArgs)
{
return response;
}
});
}
Código HTML:
Ver original<table dojotype="dojox.grid.DataGrid" id="dropPerrev" query="{ utm_per_codigo: '*' }" clientSort="true" onclick="deletePerirevi();" > <th field="utm_per_codigo" width="50px" name="CODIGO" hidden="true" headerStyles="color: black;font-size:11px;font-weight: bold;" styles="text-align:center;cursor: pointer;"></th> <th field="utm_per_categoria" width="80px" name="CATEGORIA" headerStyles="color: black;font-size:11px;font-weight: bold;" styles="text-align:center;cursor: pointer;"></th> <th field="utm_per_descripcion" width="100%" name="DESCRIPCION" headerStyles="color: black;font-size:11px;font-weight: bold;" styles="text-align:justify;cursor: pointer;"></th> <th field="utm_per_mes" width="80px" name="EDICION" headerStyles="color: black;font-size:11px;font-weight: bold;" styles="text-align:center;cursor: pointer;"></th> <th field="utm_per_anio" width="80px" name="ANIO" headerStyles="color: black;font-size:11px;font-weight: bold;" styles="text-align:center;cursor: pointer;"></th>