Ver Mensaje Individual
  #5 (permalink)  
Antiguo 08/10/2013, 13:03
Avatar de BlinDer
BlinDer
 
Fecha de Ingreso: julio-2013
Mensajes: 52
Antigüedad: 10 años, 9 meses
Puntos: 0
Respuesta: Jqgrid, Java Action y Json

hola y gracias a todos por su aporte lo que tengo es esto, al correr me marca un error en el js cuando mando a llamar al grid en el caption espero me puedan ayudar de favor se los agradeceria!!

jsp

Código PHP:
<div style="float: left;">
              <
table id="projectTable"></table>
              <
div id="pagingDiv"></div>
          </
div

--- JS ---
Código PHP:

function tabla() {
    
jQuery("#projectTable").jqGrid({
        
url'Codigos.do?do=cargaGRid',
        
datatype'json',
        
sortabletrue,
        
//datatype:'local',//para que funcione de manera local
        //contentType:'application/x-www-form-urlencoded',
        
colNames: ['id''codigo''producto''precio'],
        
colModel: [
            {
name'id'index'id'width100},
            {
name'codigo'index'codigo'width100},
            {
name'producto'index'producto'width100},
            {
name'precio'index'precio'width100}
        ],
        
rowNum20,
        
altRowstrue,
        
rowList: [20406080100],
        
pager"#pagingDiv",
        
sortname'id',
        
sortorder'asc',
        
rownumbersfalse,
        
viewrecordstrue,
        
//caption:'Activos',
        
caption"Json Example" ///// AQUI ME ESTA MARCANDO EL ERROR "" jQuery(...).jqGrid is not a function "" ESTE ES EL ERROR 
ACTION JAVA

Código PHP:
codigodao = new CodigoDAO();
        
Gson gson = new Gson();
        
DynaActionForm frmForm = (DynaActionFormform;
        List<
Codigolist_b codigodao.cargaTabla();

        
String formatoJSON gson.toJson(list_b);
        
System.out.println("Texto en Formato JSON de los alumnos agregados:\n" formatoJSON);
        return 
mapping.findForward("ok"); 
EL OTRO PROBLEMA ES QUE TENGO Q REGRESAR O HACIA DONDE LO TENGO Q REGRESAR!!!!!!
espero me puedan ayudar para que pueda resolver este problema y gracias a TODOS POR SU TIEMPO