-
27 Dec 2012 6:56 AM #171
proxy config from Store
proxy config from Store
Hi Vadimv, i'm not certain about the config here
do i have to use the same proxy type , or create a new one ?
cause when i tried t create a new one everything stucks
Code:Ext.define('CWFSE.store.Groups', { extend: 'Ext.data.Store', requires: ['CWFSE.model.Group', 'Ext.data.proxy.SQLOverride'], xtype:'groupStore', config: { storeId: 'groupLst', autoLoad: true, autoSync: true, model:'CWFSE.model.Group', proxy: { type: 'sql' } } });
2nd question in the SqlOverride.js
do you have to refer to your db or set it as yours ?
Code:return sqlitePlugin.openDatabase("data.sqlite");
-
27 Dec 2012 9:04 AM #172
1. your config is ok, remove from requires:
Ext.data.proxy.SQLOverride2. you need to put your database name.
Vadim
-
28 Dec 2012 12:43 AM #173
nothing happens
nothing happens
Vadmiv
After applying your advice, i tried to add a new line to my group store.
I can see it in the proxy, but not in the sqlite database ....
Do you have a full example , to see what's going wrong with mine ?
-
28 Dec 2012 1:54 AM #174
have you made store sync or record save ?
-
28 Dec 2012 2:04 AM #175
yes, here's my code
i'm doubting a little about the override ....Code:var groupst=Ext.getStore('groupLst'); groupst.add([{ GRP_ID :'1', ADR_ID :'1', UPL_ID:'1', TRD_ID:'1', GRP_NAME:'TITO', GRP_MAIL:'mail@collectif', GRP_TEL:'0411020304', GRP_URL:'adresseurlx', GRP_SHARE_SMS:'1', GRP_NBR_WORKSTATION:'0', GRP_TOKEN:'24544' }]); groupst.sync();
-
28 Dec 2012 7:12 AM #176
do you have an id field in model ? also check for panthom after sync if is false
-
29 Dec 2012 11:55 PM #177
Storage size
Storage size
hi again
here is the error i got when i increase DB size over than 50 MB in IPAD (v5)
"SECURITY_ERR
OM Exception 18: An attempt was made to break through the security policy of the user agent"
i believe this is a privilege issue, but why its appear only when i increase the DB size? and how i can fix it?
(my application is for IOS (IPAD) only)
-
3 Jan 2013 12:40 AM #178
my model don't have any ID, it should ?
cause i tried with an idproperty , and an identifier and nothing have change ...
-
3 Jan 2013 3:30 AM #179
should have an id, otherwise won't sync&save.
Code:Ext.define('App.model.MyModel', { extend: 'Ext.data.Model', config: { fields: [ { name: 'id', type: 'int' }, { name: 'myfield', type: 'string' } ], proxy: { type: 'sql' } } });
-
10 Jan 2013 11:46 PM #180
issue with 'read' when using filterfn()
issue with 'read' when using filterfn()
You guys might have fixed this already, maybe not
When you send a function that returns a string to whereClause, the code we downloaded was adding a 'null' to the end of the WHERE clause.
eg StartDate BETWEEN '2013-01-01' AND '2013-02-01' null
Because of the last else in the construction of the sql string ... This code was the culprit
Anyhow ... by moving all the codePHP Code:sql += ' ' + filter.getValue();
up toPHP Code:/* FROM HERE*/ if (!filter.getExactMatch() && /*... DOWN TO the "Cuplrit" */
... problem solvedPHP Code:if(typeof filter.getFilterFn() == 'string'){ ... } else { /*MOVE TO HERE*/ }


Reply With Quote