1. #1
    Sencha User
    Join Date
    Jan 2012
    Posts
    7
    Vote Rating
    0
    hataru is on a distinguished road

      0  

    Default Store/Model/Proxy

    Store/Model/Proxy


    Hi all,

    i create a Store with Model and Proxy. I configure Proxy for Ajax request with associated api like following:

    Ext.define('xxxxx.store.yyyyyy', {
    extend: 'Ext.data.Store',
    model: 'xxxxxx.model.yyyyyyy',
    autoLoad: true,
    autoSync: true,

    sorters: [
    {property: 'id', direction: 'ASC'}
    ],
    });

    Ext.define('xxxxxx.model.yyyyyyy',{
    extend: 'Ext.data.Model',

    fields: [
    {name: 'id', type: 'string'},
    {name: 'group', type: 'string'},
    ......
    ],

    idProperty:'id',

    proxy: {
    type: 'ajax',
    api: {
    read: 'scripts/read.php',
    create: 'scripts/user.php?action=create',
    update: 'scripts/user.php?action=update',
    destroy:'scripts/user.php?action=destroy'
    },


    reader: {
    type: 'json',
    root: 'passwords'
    },
    writer: {
    type: 'json',
    writeAllFields: true,
    root: 'passwords'
    }
    });


    Every time i ask for store.sync(); php file doesn't receive any call.
    The only one who works is read api. Any ideas?

    Sorry for my poor english.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,780
    Vote Rating
    833
    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


    Did you look in the network tab of developer tools to see if you see the request fire off? Any errors?
    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
    Jan 2012
    Posts
    7
    Vote Rating
    0
    hataru is on a distinguished road

      0  

    Default


    i made these two test:

    first test:
    var XYZ = getXYZStore();
    XYZ.sync();
    nothing done in network tab and no error on console tab

    second test:
    this.getXYZStore.sync();
    on console tab returns this error:

    Uncaught TypeError: Object function () { return fn.apply(scope, args.concat(Ext.Array.toArray(arguments))); } has no method 'sync'

    i use GPL Ext 4.0.7 library.

    thanks

  4. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,780
    Vote Rating
    833
    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


    Code:
    this.getXYZStore.sync();
    probably should be

    Code:
    this.getXYZStore().sync();
    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.

  5. #5
    Sencha User
    Join Date
    Jan 2012
    Posts
    7
    Vote Rating
    0
    hataru is on a distinguished road

      0  

    Default


    yes i make a mistake while typing

    this.getXYZStore().sync(); nothing on Network Tab

    this.getXYZModel().save(): error:

    Uncaught TypeError: Object function () { return this.constructor.apply(this, arguments); } has no method 'save'

    I'm going mad!!

    Is there any example about MVC with CRUD method and PHP file working?

  6. #6
    Sencha User Ghostly's Avatar
    Join Date
    Apr 2012
    Location
    Whitefish, MT USA
    Posts
    31
    Vote Rating
    2
    Ghostly is on a distinguished road

      0  

    Default


    https://github.com/ErnestoR/Extjs4_PHP_MySQL

    re: "Is there any example about MVC with CRUD method and PHP file working?"
    Donnie Martin - noob cake
    Ext JS 4.1 & Architect 2.0 - Ajax/LAMP
    "My email address is older than you, not kidding"

Thread Participants: 2

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi