sencha-touch

Select options in sencha touch is not working for android

那年仲夏 提交于 2020-01-15 06:13:11
问题 I have an application where i am using sencha touch JS API for UI rendering. The UI works fine in chrome browser but not working in Android or iPhone device. i have used the following code. Ext.regModel('Contact', { fields: ['firstName', 'lastName'] }); var store1 = new Ext.data.JsonStore({ model : 'Contact', autoLoad : true, autoDestroy : true, data: [ {firstName: 'Tommy', lastName: 'Maintz'}, {firstName: 'Rob', lastName: 'Dougan'}, {firstName: 'Ed', lastName: 'Spencer'}, {firstName:

Uncaught Error: [Ext.createByAlias] Cannot create an instance of unrecognized alias: widget

試著忘記壹切 提交于 2020-01-14 07:32:49
问题 Here is a simple view that i want to instantiate : Ext.define('myapp.view.Home',{ extend 'Ext.Panel', xtype : 'testpanel' , config: { title:'home', iconCls:'home', cls : 'home', html: [ '<h1> Hello Guys </h1>', '<p> some text goes here </p>' ].join("") } }); i have added the view to my controller as follows : Ext.define('myapp.controller.Main', { extend : 'Ext.app.Controller', views : ['Home'], ... } i have used the xtype in my application as follows: items:[{ xtype : 'testpanel' }, Still I

Uncaught Error: [Ext.createByAlias] Cannot create an instance of unrecognized alias: widget

时光毁灭记忆、已成空白 提交于 2020-01-14 07:30:10
问题 Here is a simple view that i want to instantiate : Ext.define('myapp.view.Home',{ extend 'Ext.Panel', xtype : 'testpanel' , config: { title:'home', iconCls:'home', cls : 'home', html: [ '<h1> Hello Guys </h1>', '<p> some text goes here </p>' ].join("") } }); i have added the view to my controller as follows : Ext.define('myapp.controller.Main', { extend : 'Ext.app.Controller', views : ['Home'], ... } i have used the xtype in my application as follows: items:[{ xtype : 'testpanel' }, Still I

phoneGap camera and sencha touch view

点点圈 提交于 2020-01-14 06:18:10
问题 I have to combine the phoneGap camera api with sencha touch. I have created a view CameraView and a controller Camera , but I don't know how to display the image captured by the camera on my view. // JavaScript Document LoginForm.views.CameraView = Ext.extend(Ext.form.FormPanel, { id:'CameraView', title: "CameraView", html:'<img height=200 width=200 id="myImage"/>', initComponent: function() { Ext.apply(this, { bodyStyle:'background-color:#fff;padding: 10px', dockedItems: [{ dock:'bottom',

google maps implementation in sencha touch 2 (the MVC way)

陌路散爱 提交于 2020-01-13 07:29:05
问题 can anyone please point me in the right direction about how to implement google maps in sencha touch 2.2.1 in an MVC fashion? a good step by step tutorial maybe? I need to have a view and a controller but am not sure what is the correct way of doing it as regards defining map options and initializing the map. Been looking at various tutorials on the Internet but none of them matches exactly what I want to implement. I am using a tab panel and my map needs to be displayed when clicking one of

Dynamic item template in NestedList

帅比萌擦擦* 提交于 2020-01-13 05:38:51
问题 I have a nested list in my application : this.nestedList = new Ext.NestedList({ store: app.stores.Document, cls:'list-espace', displayField : 'text', toolbar: { ui:'dark', cls:'document-list-toolbar', }, title:'/', scope : this, getItemTextTpl: function(node){ return '<table height="40px" border="0"><tr><td style="vertical-align:middle;padding-left:5px;padding-right:5px;"><div class="nestedDefault {iconCls}"></div></td><td class="file-name" style="vertical-align:middle">{text}</td></tr><

How to get user position by GPS in Sencha

人盡茶涼 提交于 2020-01-13 05:27:27
问题 I'm trying to get user position in Sencha Touch 2: var geo = new Ext.util.Geolocation({ autoUpdate: true, allowHighAccuracy: true, listeners: { locationupdate: function(geo) { lat = geo.getLatitude(); lon = geo.getLongitude(); // here comes processing the coordinates } } }); But I've got coordinates only from network. There's no GPS icon on Android device, pointing that I'm using GPS. Also it doesn't work when I turn off internet connection. How can I enable GPS positioning? In Manifest file

Detect application refocus event

时间秒杀一切 提交于 2020-01-12 19:06:31
问题 I need to know each time the user is starting to use the application. Case 1 (OK) : The app is not started. The user starts the application from scratch. I add a listener on the app's bootstrap, and I am aware when it starts. Case 2 (TODO) : The app has been started but it's not active anymore The user reload the application from the taskbar. I want to know when the application comes from the taskbar to the foreground (like a alt+tab). This is tricky to catch, because the app is still running

Sencha Touch JSON Format

↘锁芯ラ 提交于 2020-01-11 13:29:09
问题 I'm trying to input a JSON file with the following format: [{"target": "stats.server14", "datapoints": [[0.0, 1340034660], [0.016666666666666666, 1340034720], [0.11666666666666667, 1340034780], [0.18333333333333332, 1340034840], [0.05, 1340034900], [0.0, 1340034960], [0.05, 1340035020],[null, 1340121000]]}] I cannot figure out how to parse this, as it includes metatags and nested data points. Here is what I have so far: Ext.regModel('DataModel', { fields: [ {name: 'target', type: 'string'},

Email form detail in Sencha Touch giving exception

假如想象 提交于 2020-01-11 13:18:28
问题 I have a form in my page. I want the form details, which are filled by user, to send on a particular email. Here is my Form: xtype: 'formpanel', width: 300, height: 900,//recommended for the build url: 'contact.php', scrollable:false, items:[ { xtype: 'textfield', name : 'name', label: 'Name', labelWidth:100 }, { xtype: 'textfield', name : 'Date of birth', label: 'Date of birth', maxLength: 10, labelWidth:120 }, { xtype: 'textfield', name : 'Nationality', label: 'Nationality', labelWidth:100