Results 1 to 3 of 3

Thread: after build app for production load doesnt work fine

  1. #1
    Sencha User
    Join Date
    Feb 2010
    Location
    Figueres (Spain)
    Posts
    368
    Vote Rating
    5
      0  

    Default after build app for production load doesnt work fine

    i have this method working fine in developer mode

    Code:
        //
        // Cargar los miembros del equipo (el parametro de la categoria se guarda en el tabmenu superior)
        //
        onEquiposListaInit: function(list, eOpts) {
    
            var me = this;        
            var catequiposTabmenu = me.getCatequiposTabmenu();
    
            // Arrastrar titulo 
            list.setTitle(catequiposTabmenu.title);
    
            // Mostrar mascara "cargando"
            list.setMasked({
                xtype : 'loadmask',
                indicator : true,
                message : 'Carregant ...'
            });
                        
            // filtrar miembros del equipo por su categoria equipo
            list.getStore().load({
                params: {
                    id_CatEquipos: catequiposTabmenu.id_CatEquipos,
                    buscar: null
                },
                callback: function(records, operation, success) {
                    // Quitar mascara "cargando"
                    list.unmask();
                }
            });
            
        }
    the store config
    Code:
                autoLoad: false,
                autoSync: false,
                buffered: false,
                model: 'cfnavataST.model.equipo',
                remoteSort: true,
                remoteFilter: true,
                pageSize: -1,
                proxy: {
                    type: 'ajax',
                    url: 'php/Equipos_ajax.php?ajaxope=obtener',
                    actionMethods: {
                        create: 'POST', read: 'POST', update: 'POST', destroy: 'POST'
                    },
                    batchActions: false,
                    paramAsHash: true,
                    extraParams: {  
                        id_CatEquipos: null,
                        buscar: null
                    },
                    reader: {
                        type: 'json',
                        rootProperty: 'data',
                        idProperty: 'id_Equipo',
                        totalProperty: 'total',
                        successProperty: 'success',
                        messageProperty : 'message'                    
                    }
                }
    The model
    Code:
    // Modelo de datos para los equipos
    Ext.define('cfnavataST.model.equipo', {
        extend: 'Ext.data.Model',
        
        config: {
            idProperty: 'id_Equipo',
            fields: [
                { name: 'id_Equipo',                 type: 'integer' },
                { name: 'id_Contacto',                 type: 'integer' },
                { name: 'id_CatEquipos',             type: 'integer' },
                { name: 'Tipo',                         type: 'string' },
                { name: 'Dorsal',                     type: 'integer' },
                { name: 'Posicion',                     type: 'string' },
                { name: 'Observaciones',             type: 'string' },
    
                { name: 'Nombre',                     type: 'string' },
                { name: 'Apellidos',                 type: 'string' },
                { name: 'Mote',                         type: 'string' },
                { name: 'Direccion',                 type: 'string' },
                { name: 'Poblacion',                 type: 'string' },
                { name: 'Provincia',                 type: 'string' },
                { name: 'Telefono1',                 type: 'string' },
                { name: 'Telefono2',                 type: 'string' },
                { name: 'eMail',                     type: 'string' },
                { name: 'Dni',                         type: 'string' },
                { name: 'CatSalut',                     type: 'string' },
                { name: 'FechaNaci',                type: 'date', dateFormat: 'Y-m-d' },
                { name: 'Foto',                         type: 'string' },
                { name: 'Edad',                     type: 'integer' }
            ]
        }
        
    });
    When i test the web in developping mode (not builded), i can receive correctly the parameter "id_CatEquipos" in php $_REQUEST, but after i build the sencha touch app, with:

    Code:
    sencha app build production
    i open browser to the production web url and all works fine except the load doesn't send any value for the "id_CatEquipos" parameter. I have inspected with firebug and the post headers sends the parameter with its name , but without value.

    where could be the problem ??
    -------------------
    Manel Juarez

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Vote Rating
    1272
      0  

    Default

    Instead of type : 'integer', try 'int'
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Feb 2010
    Location
    Figueres (Spain)
    Posts
    368
    Vote Rating
    5
      0  

    Default

    Sorry about my late response,

    I've tried your proposal and got the same result.
    After build the POST don't send the parameter value.

    I'm working with Sencha Touch 2.1.0
    Could be a bug ?

    Code:
    //@charset UTF-8
    
    // Modelo de datos para los equipos
    Ext.define('cfnavataST.model.equipo', {
        extend: 'Ext.data.Model',
        
        config: {
            idProperty: 'id_Equipo',
            fields: [
                { name: 'id_Equipo',                 type: 'int' },
                { name: 'id_Contacto',                 type: 'int' },
                { name: 'id_CatEquipos',             type: 'int' },
                { name: 'Tipo',                         type: 'string' },
                { name: 'Dorsal',                     type: 'int' },
                { name: 'Posicion',                     type: 'string' },
                { name: 'Observaciones',             type: 'string' },
    
                { name: 'Nombre',                     type: 'string' },
                { name: 'Apellidos',                 type: 'string' },
                { name: 'Mote',                         type: 'string' },
                { name: 'Direccion',                 type: 'string' },
                { name: 'Poblacion',                 type: 'string' },
                { name: 'Provincia',                 type: 'string' },
                { name: 'Telefono1',                 type: 'string' },
                { name: 'Telefono2',                 type: 'string' },
                { name: 'eMail',                     type: 'string' },
                { name: 'Dni',                         type: 'string' },
                { name: 'CatSalut',                     type: 'string' },
                { name: 'FechaNaci',                type: 'date', dateFormat: 'Y-m-d' },
                { name: 'Foto',                         type: 'string' },
                { name: 'Edad',                     type: 'int' }
            ]
        }
        
    });
    -------------------
    Manel Juarez

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •