sencha-touch-2

Unable setting nested json data on localstorage in sencha touch

倖福魔咒の 提交于 2019-12-30 12:52:36
问题 I have problem to setting nested json data on localstorage in sencha. I have Store class: Ext.define('default.store.Top25Store',{ extend: 'Ext.data.Store', config: { autoLoad:true, model: 'default.model.Top25WordFinal', id:'TodaysWord', proxy: { type: 'ajax', url: 'http://alucio.com.np/trunk/dev/sillydic/admin/api/word/my_favourite_words_with_definition/SDSILLYTOKEN/650773253e7f157a93c53d47a866204dedc7c363', reader: { type:'json', rootProperty:'' } } } }); and model class: Ext.define('default

Sencha Touch 2 MVC - how to switch views with button

浪子不回头ぞ 提交于 2019-12-30 01:07:12
问题 I have this controller: Ext.define('MyApp.controller.Test', { extend: 'Ext.app.Controller', config: { }, refs: [ { ref: 'first', selector: '#first' }, { ref: 'second', selector: '#second' } ], views : [ 'TestMain', 'TestSecond' ], init: function() { this.getTestMainView().create(); this.control({ '#first': { tap: function() { //how do I go to second view here? } }, '#second': { tap: function() { } } }); } }); and these 2 views: Ext.define('MyApp.view.TestMain', { extend: 'Ext.Container',

how to fullscreen a Sencha Touch 2 page on a WebKit browser?

百般思念 提交于 2019-12-29 00:49:25
问题 When I visit http://www.wikpic.com/ on my Android-WebKit-browser the page renders on fullscreen, in other words the navigation bar that shows the URL disappear. How can I do that? I tried this option but it doesn't work: Ext.create('MyApp.view.MyList', {fullscreen: true}); This is my app.js code: Ext.Loader.setConfig({ enabled: true }); Ext.application({ models: [ 'Contacto' ], stores: [ 'Contactos' ], views: [ 'MyList' ], name: 'MyApp', launch: function() { Ext.create('MyApp.view.MyList',

auto scroll to the bottom of container in sencha touch 2

一世执手 提交于 2019-12-25 14:00:15
问题 I have a view that contains 2 parts: + Part 1: an ADD button + Part 2: a container LIST that has scroll attribute is auto. When user clicks on button ADD, the system will add a container to container LIST. User can add as much as they want. But my container LIST has limit height so I want to scroll to new container that added to container LIST when user clicks ADD button. Anyone help me. Thanks 回答1: I tried to use: var scroller = pan.getScrollable().getScroller(); scroller.scrollToEnd(true);

Sencha Touch: load store for List using Rest Proxy

末鹿安然 提交于 2019-12-25 11:27:34
问题 I'm new to sencha so I'm sure I'm just missing something simple here. I have a rest service and I need to be able to load my store for my list view. Here's my model with the proxy: Ext.define('UserModel', { extend: 'Ext.data.Model', config: { fields: [ { name: 'UserId', type: 'int' }, { name: 'FullName', type: 'string' } ], proxy: { type: 'rest', url: '/rest/user', reader: { type: 'json', root: 'user' } } } }); And this code works fine for a GET request. So I know that I'm able to talk with

Sencha Touch: load store for List using Rest Proxy

99封情书 提交于 2019-12-25 11:26:02
问题 I'm new to sencha so I'm sure I'm just missing something simple here. I have a rest service and I need to be able to load my store for my list view. Here's my model with the proxy: Ext.define('UserModel', { extend: 'Ext.data.Model', config: { fields: [ { name: 'UserId', type: 'int' }, { name: 'FullName', type: 'string' } ], proxy: { type: 'rest', url: '/rest/user', reader: { type: 'json', root: 'user' } } } }); And this code works fine for a GET request. So I know that I'm able to talk with

Textfield to pop out a keyboard which contains the phone keypad/numbers only

◇◆丶佛笑我妖孽 提交于 2019-12-25 05:08:43
问题 I have created a textfield as follows; { xtype:'textfield', name:'telephone', label:'Telephone' } Instead of popping up the default keyboard which has characters and numbers. I need the keyboard to only display the phone keypad (Only numbers). Since the textfield is about getting the phone number of the user, there's no point displaying a keyboard with characters. 回答1: You might want to try using numberfield instead. 回答2: Using property component of textfield: { xtype:'textfield', component:

How to make bigger icons in bottom tab bar in sencha?

一曲冷凌霜 提交于 2019-12-25 01:43:02
问题 In my application, i added a bottom tab bar with home icon and feedback icon using iconCls. But as i am developing for android tablet, it is coming very small. How can i make those icon big? and how to align properly?? means one icon in left, another in middle and another in right.. Thanks in advance.. 回答1: Try to change the 1.65em value into something bigger. But keep the same value everywhere. .x-tabbar .x-tab .x-button-icon { -webkit-mask-size: 1.65em; width: 1.65em; height: 1.65em; } Hope

How to add a Search Bar to a Nested List?

こ雲淡風輕ζ 提交于 2019-12-25 01:24:03
问题 How can I create a Nested List with a search bar, which should be located under the title. For instance, on the fourth Sencha Nested List example, how would I insert a Search Bar (code below) so that it looks like this image: Sencha Example Example Search Bar: Ext.define('Sencha.view.SearchBar', { extend: 'Ext.Toolbar', xtype : 'searchbar', requires: ['Ext.field.Text', 'Ext.field.Search'], config: { ui: 'searchbar', layout: 'vbox', items: [ { xtype: 'title', title: 'Search' }, { xtype:

Placeholder in sencha

╄→гoц情女王★ 提交于 2019-12-25 00:23:46
问题 I have a place holder which disappears only when the user starts typing. How to make it disappear when the user clicks on it. { xtype: 'textfield', id: 'road', placeHolder :'Road', label: 'Road' } Please do help. 来源: https://stackoverflow.com/questions/10026082/placeholder-in-sencha