1. #1
    Sencha User
    Join Date
    Feb 2010
    Posts
    355
    Vote Rating
    4
    maneljn is on a distinguished road

      0  

    Default after build app for production load doesnt work fine

    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 Juàrez

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,063
    Vote Rating
    851
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Instead of type : 'integer', try 'int'
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Feb 2010
    Posts
    355
    Vote Rating
    4
    maneljn is on a distinguished road

      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 Juàrez

Thread Participants: 1