Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Sencha User
    Join Date
    Aug 2012
    Posts
    2
    Vote Rating
    0
    jatrex is on a distinguished road

      0  

    Default Unanswered: Problem accessing store and loading data into store

    Unanswered: Problem accessing store and loading data into store


    Hi guys, i'm new to Sencha, and right now, im having some issues with the store system. I created a list view to get data from a store, the store is connected to a model and uses ajax as source to get the required data from mysql database (a search system/engine). my code is as follows;

    Model:
    Ext.define('MyApp.model.MyModel', {
    extend: 'Ext.data.Model',

    config: {
    fields: ['field1', 'field2', 'field3', 'field4', 'field5', 'field6', 'field7', 'field8']
    },
    });

    Store:
    var stor=Ext.define('MyApp.store.MyStore', {
    extend: 'Ext.data.Store',
    requires: 'MyApp.model.MyStore',

    config: {
    autoLoad: true,
    //storeId: 'myId', Problem 1
    model: 'MyApp.model.SearchResult',
    proxy: {
    method: 'GET',
    type: 'ajax',
    url: 'handler.php',
    extraParams: {
    get_items: 'yes',
    },
    reader: {
    type: 'xml',
    root: 'records',
    record: 'record',
    }
    }
    }
    });

    List View:
    Ext.define('MyApp.view.MyList', {
    extend: 'Ext.List',
    xtype: 'listresult',
    requires: ['MyApp.store.MyStore'],

    config: {
    title: 'Store',
    itemTpl: '{field1}',
    store: 'MyStore',
    onItemDisclosure: true,
    }
    });

    Without giving the store a "storeId", the store connects with the handler.php and gets the default list. I then try to change the list when users enter something in the search form, the form is submitted to change the what data will be returned when the list page loads (list page is called when the search form is submitted), instead, it loaded the default list.
    I thought about using the setData() or/and setProxy() methods, but they require an object of the store, so I added the storeId config then assigned the store object to a variable "my", ie

    var "myliststore"=Ext.getStore("myliststore");

    On doing this, i created the object, but now, the list is supplied no data from the store. I then tried to supply data using
    myliststore.setProxy({
    method: 'GET',
    type: 'ajax',
    url: 'handler.php',
    extraParams: {
    get_items: 'yes',
    },
    reader: {
    type: 'xml',
    root: 'records',
    record: 'record',
    }
    });
    No data was loaded still. Please, I'll like for anyone to help me, I've been on this for 2 days now

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


    So all you need to do now is load the store? store.load() ?
    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
    Aug 2012
    Posts
    2
    Vote Rating
    0
    jatrex is on a distinguished road

      0  

    Default thanks Mitch

    thanks Mitch


    i figured that out

Thread Participants: 1

Tags for this Thread