1. #191
    Sencha User
    Join Date
    Jan 2012
    Location
    London, UK
    Posts
    484
    Vote Rating
    48
    shepsii has a spectacular aura about shepsii has a spectacular aura about shepsii has a spectacular aura about

      0  

    Default


    You should be using the sencha touch 2.2 proxy if you're on 2.2 now as that works fine for me. It filters using queries on the database with the filters param rather than remoteFilters but this works just fine.

    I would recommend people switch over.

    As for persistancy, please be aware that sqlite and websql are different things. They happen to share, for the most part, their query language, but here is the main difference:
    - websql is a browser based database implementation. Sometimes it works on a sqlite backend. The W3C have abandoned the specification for this since 2010, but it remains implemented in nearly all modern browsers. IT IS NOT TRULY PERSISTENT! Any user can delete the data from the browser at any time they wish.
    - sqlite is a type of database that can be accessed on most platforms, and relevantly here iOS and Android. It is NOT websql, although websql may be working with a sqlite implementation. Sqlite itself is therefore only available through natively packaged apps, and you'll need something other than HTML and Javascript to implement it. I believe Sencha has implemented such a feature in 2.2 and there are cordova plugins available. If you use these, then the application that has control of the database is your app - not the browser. You can control where the sqlite file goes, therefore controlling its persistency (make sure you put it in the relevant place on iOS - this is determined by whether the data is user generated (needs to go in icloud folder) or data that could be redownloaded again from your servers).
    I blog about Sencha Touch at www.senchatouchdev.com

  2. #192
    Sencha User
    Join Date
    Nov 2012
    Posts
    23
    Vote Rating
    1
    Manoj Solanki is on a distinguished road

      0  

    Default Problem with store count.

    Problem with store count.


    Hello friends,

    I have a table which having some records(Users). But I can not get store count in app.js launch function.

    console.log(Ext.getStore('User_S').getCount());
    console.log(Ext.getStore('User_S').getAllCount());

    Store:
    Ext.define('ListDemo.store.User_S',
    extend: 'Ext.data.Store',
    requires: ['ListDemo.model.User_M'],
    config: {
    model:'ListDemo.model.User_M',
    autoLoad: true,
    autoSync :true
    }
    });

    Model:


    Ext.define('ListDemo.model.User_M', {
    extend: 'Ext.data.Model',
    config: {
    fields:[{name:'id',type:'int'},
    {name:'name',type:'string'},
    {name:'password',type:'string'},
    {name:'email',type:'string'},
    {name:'phone',type:'string'}],
    proxy:{
    type: 'sqlitestorage',
    dbConfig: {
    tablename: 'tblUser',
    dbConn: ListDemo.util.InitSQLite.getConnection()
    }
    },
    validations: [
    {type: 'presence', field: 'password',message:'Password can not be blank'},
    {type: 'length', field: 'name', min: 4, message:'Name must be greater than 4 character'},
    ]
    }
    });

    Please help.

    Thanks

  3. #193
    Sencha User
    Join Date
    Jan 2012
    Posts
    21
    Vote Rating
    0
    jastako is on a distinguished road

      0  

    Default


    Hi @Manoy Solanki,

    First of all, what are the logs?

    If you are deploying your app on device and testing it against its native SQLite DB, which is stored in FS, rather than HTML5 WebSQL, you have to wait with populating store with data until DB is accessible. That is (in PhoneGap world) you would wait for "deviceready" signal and then query handle to DB (which API is compatible with HTML5 WebSQL). In your approach you make attempt to access DB on app launch, by specifying model's proxy. Wait with this, until "deviceready" is emitted and then assign such proxy to your S-T-O-R-E .

    However, if submitted snippet doesn't work on your local machine in the web browser with WebSQL DB support I would recommend you to assign this proxy to store rather than model. At least I tend to do so, such a way and it works all the time.

    Hope it helps.

    Cheers,
    Kuba

  4. #194
    Sencha User
    Join Date
    Nov 2012
    Posts
    23
    Vote Rating
    1
    Manoj Solanki is on a distinguished road

      0  

    Default DB linking at the time of LAUNCH fucntion.

    DB linking at the time of LAUNCH fucntion.


    Thanks Kuba,

    You are correct at the time of launch function the connection with DB table is not established.

    Thanks again.


    Quote Originally Posted by jastako View Post
    Hi @Manoy Solanki,

    First of all, what are the logs?

    If you are deploying your app on device and testing it against its native SQLite DB, which is stored in FS, rather than HTML5 WebSQL, you have to wait with populating store with data until DB is accessible. That is (in PhoneGap world) you would wait for "deviceready" signal and then query handle to DB (which API is compatible with HTML5 WebSQL). In your approach you make attempt to access DB on app launch, by specifying model's proxy. Wait with this, until "deviceready" is emitted and then assign such proxy to your S-T-O-R-E .

    However, if submitted snippet doesn't work on your local machine in the web browser with WebSQL DB support I would recommend you to assign this proxy to store rather than model. At least I tend to do so, such a way and it works all the time.

    Hope it helps.

    Cheers,
    Kuba

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar