sencha-touch

How to manipulate dynamic objects in Sencha touch

送分小仙女□ 提交于 2019-12-11 19:17:53
问题 So I would like to dynamically load / change elements of the xtype objects . So for example on the logic in the initialise method I would like to load either one or the other this.down("#homeView").title . Ext.define("APN.view.FlyoutNavigation", { id: "flyoutNavigationPanel", extend: 'Ext.ux.slidenavigation.View', requires: [ 'Ext.Container', ], config: { items: [ { itemId: 'nav_home', id: 'homeView', title: "theTitleThatIwantToChange" ... While I'm looking at things like setHtml , or just

Javascript: undefined is not a function

淺唱寂寞╮ 提交于 2019-12-11 18:39:26
问题 This is my code for my controller: Ext.define(controller.details.StudentControlller', { extend: 'Ext.app.Controller', requires: [ ], config: { }, Init: function(){ "use strict"; var me = this; this.app = this.getApplication(); this.createStudentTables(); } createStudentTables: function () { var finalStudent=[], view=this.getStudentsTableView(); arrReqTplTest = ['<div class="StuReq"><table><tr><th class=" StuReq ">' + 'NAME ' + '<img src="resources/images/arrow-bottom-1-512.png" width="10px"

Sencha Touch : How to get the simple json file as response using JSONP?

天涯浪子 提交于 2019-12-11 18:30:19
问题 I am trying to make a simple JSONP call to get a json file which is loaded on the remote server. Here is my simple json file loaded on the server. { "login": [ { "themename": "NO", "themeId": "1" } ], "homePage": [ { "themename": "NO", "themeId": "1" } ], "transactionDetails": [ { "themename": "NO", "themeId": "1" } ] } My Controller code which calls this file to get the data Ext.data.JsonP.request( { url : 'http://xx.xx:8080/ThemeSelector.json', callback : 'someCallback' , someCallback:

Request Payload data in Sencha Touch

白昼怎懂夜的黑 提交于 2019-12-11 18:25:17
问题 Was just trying to sync a model in Sencha Touch and realised that it doesn't yet support sending of Nested Model data. So I'm having to do the Ajax request manually. How can I send the data via 'Request Payload' instead of parameters etc? Ext.Ajax.request({ url: '/api/blah', method: 'POST', params: { request: toAdd, }, success: function(response, opts) { }, failure: function(response, opts) { } }); I'm guessing it has to be a particular header I send across? Thanks, Dominic 回答1: Ext.Ajax

Sencha Touch - When switching Items using setActiveItem(), how can I access the Back button?

邮差的信 提交于 2019-12-11 18:10:12
问题 Problem: I switch Panels using setActiveItem() according to question-answer on this link App.views.viewport.getActiveItem().setActiveItem(App.views.Panel, { type: 'slide', direction: 'left' }); Everything works fine, but how can I access my back button? I suspect that theres only 1 back button, and I have to change his properties (text, handler). How Can I do that? Thank you, Shlomi. P.S- when thinking about it, I have to modify all the bar properties - its title as well. 回答1: I will try to

Customizing HTML for the List view cell

二次信任 提交于 2019-12-11 18:09:28
问题 A cell of my Sencha touch list view appears as follows; But, i want the text to display on the side as shown in the following image. How can i do this. My code looks like this : <div><img src="{IMAGE_URL}" height="55" width="55"/></div> {MAIN} <br/> {SUBMAIN} I need the following in my list view cell: 1.) I want to add a background colour White. 2.) I want to add a button, where i could click and display an alert. 回答1: Try my code and you can use this to build on var list = { xtype: 'list',

Sencha store and model set up for use with Json

冷暖自知 提交于 2019-12-11 18:08:38
问题 I've got a Json file...... [ { "Title":"Package1", "id":"1", "POI":[ { "Title":"POI1", "LayerID":"1", }, { "Title":"POI2", "LayerID":"1", } }, { "Title":"Package2", "id":"2", "POI":[ { "Title":"POI3", "LayerID":"2", }, { "Title":"POI4", "LayerID":"2", } } ] populating a store..... Ext.define('Murmuration.store.MyPackages', { extend: 'Ext.data.Store', xtype: 'myPackages', config: { model: 'Murmuration.model.PackagesModel', proxy: { type: 'ajax', url : 'data/store.json', reader: { type: 'json'

Sencha Touch 2: data intigration or how to share dynamic information between sencha and javascript

限于喜欢 提交于 2019-12-11 17:56:23
问题 I'd like to start quick. What is my problem: Within ST2 I structured my application with the MVC pattern. I have a store, a model, a controler and the views (for more information scroll down). Workflow: I click a list item ( List View with a list of elements from store) Controller acts for the event 'itemtap' Controller function is looking for main view and pushes a detail view Record data will be set as data Detail view uses .tpl to generate the output and uses the data Problem Now I want to

How to filter the Store?

纵然是瞬间 提交于 2019-12-11 17:27:19
问题 Who knows how to filter the Store right? I tried to do it in listener of leafItemTap of Nested List, but my leaf items not tapping now. Massage in console: "Uncaught TypeError: Cannot call method 'filter' of undefined " Here is Nested list, where Store must be filtered: Ext.define('Application.view.SplitView', { extend: 'Ext.Container', xtype: 'splitview', config: { layout: 'card', store: null }, initialize: function() { this.nestedList = Ext.create('Ext.NestedList', { title : 'Рецепты',

How to parse this format of xml data?

て烟熏妆下的殇ゞ 提交于 2019-12-11 16:37:30
问题 i tried to parse data of this format of xml: <?xml version="1.0" encoding="UTF-8"?> <root> <list info="INFY, Jan 20 call, 40 cents or Lower" profit="60%" loss="gdh"/> <list info="HPCL, Feb 20 PUT, 20 cents or Lower" profit="80%" loss="fgh"/> <list info="AAPL, May 290 call, 90 cents or Lower" profit="ss" loss="20%"/> <list info="DIA, April 105 call, 32 cents or Lower" profit="ghh" loss="20%"/> <list info="GOOG, Aug 350 call, 47 cents or Lower" profit="100%" loss="sdgd"/> </root> using this