sencha-touch-2

Sencha Touch 2: 'specified Store cannot be found'

帅比萌擦擦* 提交于 2019-12-10 18:38:09
问题 I'm trying to load JSON data into a NestedList. I have the following store file in /app/store/Exhibits.js Ext.define('VisitTCMIndy.store.Exhibits',{ requires: ['VisitTCMIndy.model.Exhibit', 'Ext.data.proxy.JsonP'], extend: 'Ext.data.TreeStore', config: { model: 'VisitTCMIndy.model.Exhibit', proxy: { type: 'jsonp', url: 'http://www.example.com/explore.php', reader: { type: 'json', rootPropery: 'children' } } } }); Then I reference it in the following view in /app/view/Explore.js Ext.define(

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":[ {

Store filter in sencha touch

China☆狼群 提交于 2019-12-10 13:57:30
问题 I have store having structure : Ext.create('Ext.data.Store', { fields: [ 'title' ], data: [{ title: 'ABC' }, { title: 'ABC2' }, { title: 'ABC3' }, { title: 'ABC4' }, { title: 'ABC5' }, { title: 'ABC6' }] }); So when I load this store List get populated with all 6 records. I just wanted to Filter this store on button click I just wanted to get some selected record out of this 6 record Can It be possible. Provide me Some Idea or Working code. 回答1: To filter the store based on title Ext.getStore

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

Listener to Tab Item Click in Sencha

一笑奈何 提交于 2019-12-09 21:26:23
问题 In my application, I'm using a tab panel with 5 items in it. Each item holds around 6 panels added in card layout. When I'm at the last panel inside a tab item, I need to get back to the initial panel by clicking on the bottom tab panel (somewhat similar to a normal tab view controller in iOS). I have came across some solutions I found here, but it seems to work only when I switch between the tabs. In fact I want to listen to the click event on the same tab icon. How can I do this? 回答1: I

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 Add a Button to Each Row of a List?

梦想与她 提交于 2019-12-09 17:07:20
问题 How can I add a Sencha button to each row of a list? I've added text placeholders in the image to illustrate where the buttons should go. Ext.application({ launch: function() { var view = Ext.Viewport.add({ xtype: 'navigationview', items: [ { xtype: 'list', title: 'List', itemTpl: '{name} [BUTTON]', store: { fields: ['name'], data: [ { name: 'one' }, { name: 'two' }, { name: 'three' } ] }, listeners: { itemtap: function(list, index, target, record) { view.push({ xtype: 'panel', title: record