sencha-touch-2.1

How to specify rootProperty for nested data if it is one level below?

天涯浪子 提交于 2019-12-08 05:06:16
问题 I am fetching nested data to be shown as nested list but whenever I tap on top level item, it again shows same top level list instead of showing children list and a ajax request is fired to fetch json data again. Here is the store: Ext.define('MyTabApp.store.CategoriesStore',{ extend:'Ext.data.TreeStore', config:{ model : 'MyTabApp.model.Category', autoLoad: false, storeId : 'categoriesStore', proxy: { type: 'ajax', url: 'resources/data/catTree.json', reader: { type: 'json', rootProperty:

pass data from controller to existing view in sencha tocuh

梦想与她 提交于 2019-12-08 04:08:48
问题 i am trying to pass a data from controller to existing view , i have tried following but non of them are working , i want to pass a data so that i can show it over an existing panel. from controller 1. Ext.Viewport.setActiveItem('profileinfo'); Ext.Viewport.setData(record.data); 2. Ext.Viewport.setActiveItem('profileinfo').setData(record.data); 3. Ext.Viewport.setActiveItem('profileinfo', {data:record.data}); 4. Ext.Viewport.setActiveItem({ xtype:'profileinfo', data:record.data}); where

How to Give a Overlay Panel in sencha touch a transparent background

别等时光非礼了梦想. 提交于 2019-12-06 11:34:21
The code below only changes the color of the border around the panel but not the panel itself. var overlay = Ext.Viewport.add({ xtype: 'panel', centered: true, style:'background-color: transparent;', modal: { style: 'opacity: 0' }, hideOnMaskTap:true, width:'20%', height: '50%', styleHtmlContent:true, items:[{ xtype:'button', test:'hey', cls:'notrans', style: 'opacity: 1' }] }); You need to change the x-panel-inner cls for your panel when it is centered . So what you want to do is give your panel a cls e.g: cls: my-panel . var overlay = Ext.Viewport.add({ xtype: 'panel', centered: true, style:

Sencha Touch - scroll to last tab on TabBar

怎甘沉沦 提交于 2019-12-06 06:44:03
问题 There is a view with many tabs in my App. I'd like to set focus on the last one. I can set active tab this.setActiveItem(10) , but I'm not able to scroll (programmatically) tabbar to the last item. Content of the 10th tab is shown but 10th item on tabbar is hidden, so user could be confused. Thanks a lot in advance. 回答1: A really good question and many people may find this useful. So first, instance of tabBar is needed so we can get activeTab of tabPanel . Then we can easily get the offset of

Sencha Touch - scroll to last tab on TabBar

谁都会走 提交于 2019-12-04 12:03:11
There is a view with many tabs in my App. I'd like to set focus on the last one. I can set active tab this.setActiveItem(10) , but I'm not able to scroll (programmatically) tabbar to the last item. Content of the 10th tab is shown but 10th item on tabbar is hidden, so user could be confused. Thanks a lot in advance. A really good question and many people may find this useful. So first, instance of tabBar is needed so we can get activeTab of tabPanel . Then we can easily get the offset of tab item. Here, tab item means not the container that holds tab's contents but the tab indicator which can

Global variable sencha touch 2.1

一曲冷凌霜 提交于 2019-12-04 09:40:59
问题 Hi I need to define a global variable to use in anywhere of my application. I declare a global variable baseUrl in my app.js . Please see below app.js //<debug> Ext.Loader.setPath({ 'Ext': 'touch/src',//Location of the sencha touch source files 'bluebutton': 'app', }); //</debug> Ext.application({ name: 'bluebutton',//Application Path, all classes in you app. For eg blueButton.view.Main.case sensitive views: ['Main', 'BlueButton.CouponMain', 'BlueButton.CouponList', 'BlueButton.CouponList2',

install sencha-touch 2.1 on mac

隐身守侯 提交于 2019-12-01 01:51:26
I need to install sencha touch 2.1 on my mac but I can't… i follow this guide http://www.sencha.com/learn/getting-started-with-sencha-touch-2 so i installed sencha cmd and i copy the sencha-sdk folder in the www/ directory of apache.. if i do: localhost/sencha-skd on my browser i see the docs of sencha, so the server works fine.. but from the terminal if I write the command sencha i get -bash: sencha: command not found and this happend in every folder… somebody can help me? thanks a lot Download and install Sencha Cmd : http://www.sencha.com/products/sencha-cmd/download Then ensure that the

How to get value form record in sencha touch

只愿长相守 提交于 2019-11-28 12:38:53
I am trying to get value from nested json, but unable to get value. I have following data structure. Here I am printing record. What i did. onWordTap: function(view, index, target, record, event) { var wordName=record.get('name'); console.log("Word--->>>>"+wordName); console.log(record); }, but i get in console like this:-> Word--->>>>undefined I have tried this also: var wordName=record.data.get('name'); but getting Uncaught TypeError: Object # has no method 'get' my JSON looks like this: JSON My previous question is also related to this type question, please watch . Previous Problem I am

Generate a sencha touch app

こ雲淡風輕ζ 提交于 2019-11-27 23:13:01
I am trying to create a new sencha touch app using "sencha generate app MyApp ../MyApp" command on Windows. I have done the following : Downloaded the latest sencha SDK and extracted it in folder "D:\MyProjects\sencha-touch-2.1.0-gpl" folder. Installed the sencha SDK tools in "D:\MyProjects\SenchaSDKTools-2.0.0-beta3" folder. Ensured that the system environment variable "SENCHA_SDK_TOOLS_2_0_0_BETA3" is indeed pointing to "D:\MyProjects\SenchaSDKTools-2.0.0-beta3" As per the sencha documentation I am supposed to run the sencha command in the sencha SDK or application folder. So if I cd to

How to get value form record in sencha touch

偶尔善良 提交于 2019-11-27 07:08:15
问题 I am trying to get value from nested json, but unable to get value. I have following data structure. Here I am printing record. What i did. onWordTap: function(view, index, target, record, event) { var wordName=record.get('name'); console.log("Word--->>>>"+wordName); console.log(record); }, but i get in console like this:-> Word--->>>>undefined I have tried this also: var wordName=record.data.get('name'); but getting Uncaught TypeError: Object # has no method 'get' my JSON looks like this: