sencha-touch

How to store login credentials in localstorage

独自空忆成欢 提交于 2019-12-24 19:33:59
问题 If got a sencha touch application, with a login form. For returning users, I would like to store the login credentials in the local storage. User.js App.models.User = Ext.regModel('User', { fields: [ { name: 'username', type: 'string' }, { name: 'password', type: 'string' } ], proxy: { type: 'localstorage', id: 'p2s-users' } }); Users.js App.stores.users = new Ext.data.Store({ model: 'User', autoLoad: true }); Now I try to sync the form values with local storage, how can I do that, what's the

Passing values back to the 'View' from 'Controller' class

老子叫甜甜 提交于 2019-12-24 18:25:15
问题 In my VIew, i have added a button and when i click on it, the Controller class gets called. The value's in the View (textfield values) , will be sent over the URL from the web service. Then the server will return a JSON string shown below; {"value":"SUCCESS"} Now, i need to sent this JSON string back to the view, and the view will alert the user depending on the JSON response. If the JSON returned SUCCESS, then a Success alert will get displayed and if the JSON returned FAIL, then a Fail

Changing base color in sencha touch 2.2

流过昼夜 提交于 2019-12-24 18:23:22
问题 Recently i upgraded sencha framework to 2.2, facing problem with the scss. Not able to change the base color($base-color) of the app. follwing is the code i have in app.scss @import 'sencha-touch/default'; @import 'sencha-touch/default/all'; $base-color: #008c99; color change is not reflected any where in the app. Is this the proper way to set the base color of the app, if not please let me know where i fumbled. thanks in advance. 回答1: Okay, just place the "$base-color: #008c99" above the

Sencha Touch TPL and ITEM

﹥>﹥吖頭↗ 提交于 2019-12-24 17:22:13
问题 Guys let me explain my issues, i have a List view that load some elements from a store file, when i click a List item, i have a controller who push the data in a new Details view 'placesContainer places list':{ itemtap: function(list,index,target,record) { console.log("item "+record.get('name')+" pigiato"); var detailsView = Ext.create('MyApp.view.Details'); this.getPlacesContainer().push(detailsView); detailsView.setData(record.data); } } Ok here. Now what i want is to LOAD the same

Sencha touch application loader keeps blinking

陌路散爱 提交于 2019-12-24 15:38:54
问题 I just setup an all basic sencha touch application. Just did sencha generate app *Name* *Directory* . The app is generated without any error, but when I start the server and load the application in Chrome (just updated to the latest version), I get a blue screen with three blinking dots. In the JS console, there is this: Uncaught TypeError: Object [object Object] has no method 'append'", occured in sencha-touch.js Is this a common issue? Did I do anything wrong? The app is generated with

Mobile apps - Cross-domain AJAX [duplicate]

强颜欢笑 提交于 2019-12-24 14:15:56
问题 This question already has answers here : Origin is not allowed by Access-Control-Allow-Origin (18 answers) Closed 6 years ago . I am trying to design some software to be distributed on private mobile devices (Android, iOS etc). I would like to write the software with HTML/CSS/JavaScript and use something like Sencha Touch, PhoneGap or similar. The software needs to write to a local database on the device and when it gets connectivity, post the data (securely) to a remote database on a web

Adding mousewheel to Sencha Desktop App

梦想的初衷 提交于 2019-12-24 11:45:01
问题 So the supposed advantage to using Sencha is being able to have 1 code base for multiple platforms. I have a project I need to be on iOS, Android, PC, and Mac. I have found that I can use Sencha Touch to build to mobile devices and those handle finger swipe events automatically. The problem I have encountered is when I am building a desktop app then it doesn't respond to my mousewheel. I have been on the Sencha forums and this question is unanswered in one place, and in another they promised

Build error with Sencha Command

我们两清 提交于 2019-12-24 11:34:16
问题 I just upgraded my app to Sencha Touch 2.1 and I'm now trying to build it for production. Unfortunately, I get the following error message : Sencha Cmd v3.0.0.250 [DBG] checking /Users/titouanvanbelle/Documents/workspace/app/sencha/.sencha/app for plugin.xml [DBG] checking /Users/titouanvanbelle/Documents/workspace/app/sencha/.sencha/workspace for plugin.xml [DBG] checking /Users/titouanvanbelle/bin/Sencha/Cmd/3.0.0.250/plugins/touch/current for plugin.xml [DBG] checking /Users

Reset does not work a form in Sencha Touch

对着背影说爱祢 提交于 2019-12-24 09:27:42
问题 All I want to do is when I click the reset button on my form it resets all fields. And I have tried everything but it does not seem to work. Here is the class that has the button in it: App.views.HomeIndex = Ext.extend(Ext.form.FormPanel,{ floating: true, scroll: 'vertical', itemId: 'jobSearch', centered: true, modal: true, hideOnMaskTap: false, items: [{ xtype: 'textfield', itemId: 'keywords', label: 'Keywords', labelAlign: 'top', labelWidth: '100%', name: 'keywords' },{ xtype: 'textfield',

Parsing simple JSON using Ext gives SyntaxError: Unexpected token ILLEGAL

前提是你 提交于 2019-12-24 09:03:49
问题 i'm doing a simple parse of some JSON and it's giving me an error in chrome, what am i missing here? Ext.util.JSON.decode("{info: {synopsis: 'test'}}"); SyntaxError: Unexpected token ILLEGAL Thanks a lot 回答1: http://www.json.org/ Think you should use double quotes instead of single quotes. Ext.util.JSON.decode('{"info": {"synopsis": "test"}}'); 回答2: Be careful if you are using ExtJs 4 onward, You have to use Ext.JSON.decode('{"info": {"synopsis": "test"}}'); 来源: https://stackoverflow.com