sencha-touch

Vbox layout issue in a tab panel

痴心易碎 提交于 2019-12-10 17:37:15
问题 I'm having an issue with a vbox layout so I created a simple example that illustrates the problem, which is getting my vbox layout to fit the height of the screen. On the hbox screen, the view looks as expected. However, when I simply change hbox to vbox all the text overlays in the top left corner. All the code is given below and it's on Sencha Fiddle app.js Ext.Loader.setConfig({ enabled: true }); Ext.application({ name: 'SenchaFiddle', views: ['MainView', 'HboxView', 'VboxView'], launch:

Re formatting JSON data to fit into tree store

好久不见. 提交于 2019-12-10 14:55:46
问题 I want to make Nested list of shopping categories using data provided by server which looks something like this: { "status":{"statusCode":15001}, "data":[ {"itemId":1, "name":"Men", "subCategories":[ {"itemId":2, "name":"Clothes", "subCategories":[ {"itemId":3, "name":"Formals", "leaf":true,"subCategories":[]}, {"itemId":4, "name":"Casual", "leaf":true,"subCategories":[]}, {"itemId":5, "name":"Sports", "leaf":true,"subCategories":[]} ]}, {"itemId":6, "name":"Accessories", "subCategories":[ {

How to use up() in Ext.Button handler

一曲冷凌霜 提交于 2019-12-10 11:29:02
问题 Back Ground : I am working on an MVC application using sencha touch 2. I am working on a page which has two tabs. Inside the first tab, I have a button inside a title bar. Issue : I am not able to call anyother function from the button handler. I think, there is an issue with the scope of the calling function. Here is my code. Ext.define('WUPOC.view.WUHomePage', { extend: 'Ext.TabPanel', requires:['Ext.TitleBar','Ext.dataview.List','Ext.data.proxy.JsonP'], alias: 'widget.wuHomePageView',

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

我怕爱的太早我们不能终老 提交于 2019-12-10 10:48:55
问题 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' }] }); 回答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

Should I write my app with Sencha Touch or Native? [closed]

半城伤御伤魂 提交于 2019-12-10 01:52:35
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 6 years ago . With the recent updates to Sencha Touch, it's looking more and more like a native app for iPhone and even iPad. There are still many differences and the documentation is a little lacking at the moment. My question is, given that I am already fully capable of creating native

How to properly activate an MVC View in Sencha Touch V2

家住魔仙堡 提交于 2019-12-09 19:15:30
问题 I'm running Sencha Touch V2 beta and I'm looking at the most recent documentation. I've followed the Ext.application instructions and am trying to properly lay out my MVC application. Unfortunately I can't figure out how to actually load up a View with this approach. index.js Ext.application({ name: 'rpc', defaultUrl: 'home/index', controllers: ['home'], //note: define controllers here launch: function () { console.log('Ext.application ~ launch'), Ext.create('Ext.TabPanel', { id: 'rpc

Sencha Touch 2 - How to get form values?

青春壹個敷衍的年華 提交于 2019-12-09 17:46:22
问题 I've got a Sencha Touch 2 MVC app with a form as a view. I'm trying to get it's values from the controller with no success. How could this be done? I'm posting my view/controller code for this one. View: Ext.define('MyApp.view.LoginForm', { extend: 'Ext.form.Panel', config: { fullscreen: true, items: [ { xtype: 'fieldset', title: 'Login', id: 'loginform', items: [ { xtype: 'emailfield', name: 'email', label: 'Email' }, { xtype: 'passwordfield', name: 'password', label: 'Password' } ] }, {

How to destroy an inactive view in Sencha Touch

时光毁灭记忆、已成空白 提交于 2019-12-09 16:45:12
问题 i stuck with a problem which is really important i guess. In a simple Sencha Touch App I have many views. My Mainview is a TabPanel with docking icons in the bottom. Sometimes in my App I switch to another views which are outside of the Tabpanel. I don't want the DOM to overload with views, i don't need anymore so i'm searching for a solution to destroy a view, when its inactive. I've tried this, while switching into another view in my controller: this.getMainview().destroy(); It seems that

Why should I use Ext.dispatch rather than calling controller code directly?

本小妞迷上赌 提交于 2019-12-09 16:28:41
问题 When using the [relatively new] MVC bits in Sencha Touch I find that 90% of my dispatch calls look something like: Ext.dispatch({ controller: "customers", action: 'show', record: record }); That's fine, and I like delegating the flow to the seperate controller code, rather than complicated paths of events, but I have yet to see any advantage over just doing something like: controllers.customers.show({ record: record }); Which is shorter and cleaner. I feel like I am just following the Ext

Sencha Touch: Ext.DataView not showing store data

吃可爱长大的小学妹 提交于 2019-12-09 13:54:32
问题 I know the typical reason for a DataView to be blank is because the model or JSON is wrong. From what I can tell, mine is right... so I'm not sure why my DataView is blank. Controller rpc.controllers.AboutController = new Ext.Panel({ id: 'rpc-controllers-AboutController', title: 'About', iconCls: 'info', layout: 'card', scroll: 'vertical', items: [rpc.views.About.index], dockedItems: [{ xtype: 'toolbar', title: 'RockPointe Church | Mobile' }], listeners: { activate: function () { if (rpc