sencha-touch-2

Get values from localStorage to use in Sencha Touch AJAX Proxy

自闭症网瘾萝莉.ら 提交于 2019-12-06 10:51:04
问题 In my Sencha Touch application I store some values in localStorage and they get stored just fine. Later I need to use those values for a request to a store and I need to pass those values as request headers. The code looks like the following: Ext.define('AppName.store.storeName', { extend: 'Ext.data.Store', requires: [ 'AppName.model.modelName' ], config: { model: 'AppName.model.modelName', storeId: 'storeName', proxy: { type: 'ajax', url: 'http://dynamic', headers: { auth_token: localStorage

Horizontal scrolling list

左心房为你撑大大i 提交于 2019-12-06 10:36:52
I would like to have images displayed in a horizontal list. This is what I've done so far : var list = Ext.create('Ext.List',{ store: store, itemTpl: new Ext.XTemplate('<img src="{icon}" />'), inline:true, scrollable: { direction: 'horizontal', directionLock: true } }); My store has 5 items, but the list only display two (because the screen is not large enough to display more than two images). I tried to solve this problem by setting the width of my list to 1000px like so : style:'width: 1000px', All the items are now shown, but now, the problem is the list is not scrollable anymore. I can't

Unable to access global variable entire one controller in sencha

让人想犯罪 __ 提交于 2019-12-06 09:14:52
I have been trying to access global value inside one controller, but could not access it. i have been following this How to define global variable in sencha but could not set and access global values. in Controller config: { successMessage:100, control: { 'submitnewword': { activate: 'onActivate', itemtap: 'onItemTap', ConfirmTestCommand:'Confirm' }, ....... }, onSearchKeyUp: function(searchField) { success: function (response) { this.setSuccessMessage(1); } else { this.setSuccessMessage(0); } } and access it Confirm: function () { console.log("Confirm----- Caling on Controller"); var testing

Sencha Touch 2- Unable to get ref view from controller

巧了我就是萌 提交于 2019-12-06 07:13:33
I'm trying to get view by ref. inside a method defined in controller. I'm getting error which says Object [object Object] has no method 'getUserForm'. Here's my view and controller, I'll be happy if someone can help me.. Thanks in advance. User Form Ext.define(appName + '.view.user.UserForm', { extend : 'Ext.form.FieldSet', alias : 'widget.userform', title : 'User Form', instructions: 'Fill your personel information', iconCls : 'icon-form', fullscreen: true, config : { items : [{ xtype : 'toolbar', docked : 'top', title : 'Registeration Form', iconCls : 'icon-form' }, { xtype : 'textfield',

How can I integrate Sencha Touch 2 into Cordova (Phonegap) project

时光总嘲笑我的痴心妄想 提交于 2019-12-06 06:54:31
问题 I'm trying to integrate a ST2 app into PhoneGap; but I'm having problems. I've added cordova.js into app.json: { "path": "resources/js/cordova-1.6.1.js", "update": "delta" }, { "path": "resources/js/test.js", "update": "delta" } Test.js : function alertDismissed() {} function showAlert() { navigator.notification.alert( 'You are the winner!', // message alertDismissed, // callback 'Game Over', // title 'Done' // buttonName ); } Inside a view, i've created a dummy button: items: [{ text: 'test'

Sencha Touch 2, nested XML parsing nodeValue

天涯浪子 提交于 2019-12-06 04:59:25
问题 Im using a nested XML and parsing it using 'hasMany'.. I would appreciate if someone could tell me how to read the value of the node '< type >'. I can easily read the attributes 'id' & 'val' of '' using mapping but i want to also read the node value eg. 257411 in < type id="3" val="0">257411 I would appreciate if anyone could provide a suitable 'mapping' XML data: <?xml version="1.0" encoding="ISO-8859-1"?> <basics id="744" name="social"> <number>302221</number> <types> <type id="3" val="0"

Button inside of an input field Sencha Touch 2.0

我是研究僧i 提交于 2019-12-06 04:46:35
问题 What I try to achieve is something alike this: Only then in a Sencha Touch application. I have achieved an input field with a button next to it but not a button inside of a input field. Is there a way to get this functionality in Sencha Touch 2? (without using css to float the button above the input. 回答1: you can achieve this, let's try: { xtype: 'textfield', component: { xtype: 'container', layout: 'hbox', items: [ { xtype: 'textfield', flex: 3, }, { xtype: 'button', flex: 1, text: 'test' }

Sencha Touch 2 - JSONP proxy help, template always has null for values

限于喜欢 提交于 2019-12-06 03:57:45
问题 I'm having trouble getting actual data to show up in a Sencha Touch 2 list. The list should be populated by a JSONP response, and I expect 2 rows to show up. Instead, I get one row with 'null at null'. Here's the URL that gets sent: http://some-server/data-fetcher.php?_dc=1331910031292&events=true&page=1&start=0 &limit=25&callback=Ext.data.JsonP.callback1 Here's the JSONP response: Ext.data.JsonP.callback1({"data":[{"id":"4","name":"Sample Name 1", "description":null,"location":"Sample

How can make a device phone call by android using phoneGap and Sencha Touch 2?

做~自己de王妃 提交于 2019-12-06 03:32:54
I need to make a call by android phoneGap application with sencha touch button. I have found an iphone plugin to make calls from phoneGap application. I has not found any plugins or anything for android. Please help. thanks in advance Use this line to make a phone dialer to display <a href="#" rel="external" id="ext" onclick="document.location='tel:123456'" > </a> When I look in my Phonegap 1.5.0 Example index.html for Android I see this code: <html> <head> <meta name="viewport" content="width=320; user-scalable=no" /> <meta http-equiv="Content-type" content="text/html; charset=utf-8"> <title

Sencha Touch: Clicking a button rapidly will push a view twice

倾然丶 夕夏残阳落幕 提交于 2019-12-06 02:21:50
Say I have a button that triggers a push of a new view. I noticed that if I click it more than once, fast enough, it will push the same view twice. You can mimic this behavior using their official docs on this page, where they have a live sample: http://docs.sencha.com/touch/2-0/#!/guide/navigation_view the clear question is, simply how to prevent it? Masking successfully prevents double tapping problem. In my code I'm using two functions for mask/unmask navigation container: /** * Mask container with rolling wheel. Usually need if Ajax-request is sent to the server and app waiting for