extjs5

Extjs 5, data model association & load nested data

試著忘記壹切 提交于 2019-12-10 09:28:50
问题 trying to make this work.... I want to load nested data on two object model Ext.application({ name : 'MyApp', launch : function() { Ext.define('MyApp.model.Address', { extend: 'Ext.data.Model', entityName: 'Address', fields: [ { name: 'id', type: 'int' }, { name: 'addressLine', type: 'string' }, { name: 'city', type: 'string' }, { name: 'created', type: 'date', dateFormat: 'time', persist: false } ] }); Ext.define('MyApp.model.User', { extend: 'Ext.data.Model', entityName: 'User', fields: [ {

sencha extjs 5.0 app not working in production build

被刻印的时光 ゝ 提交于 2019-12-09 12:22:28
问题 I have just built a new app with ExtJS 5.0 which seems to be really awesome. The app is working fine in development mode, but as soon as I build the app with the command line tools and deploy it, it stops working. The build command I use when I'm in the directory of the project: sencha app build production The command works fine so far, no error is in the output. I'm using a little server-side with php, so I have to change the ending of the index.html to index.php and also include the php

ExtJS: How to use itemSelector for XTemplate having nested loop?

守給你的承諾、 提交于 2019-12-08 03:15:56
问题 I am working on Ext.view.View class to create one data view for displaying list of images received after ajax proxy. As per Sencha Doc for DataView, itemSelector property is mandatory. So I am using it as itemSelector: 'div.thumb-wrap' but respective class is inside the nested loop not in the outer loop as below: JS code: Ext.define("DSApp.Desktop.view.ImageView",{ extend: 'Ext.view.View', alias : 'widget.imageviewer', initComponent: function() { Ext.apply(this,{ itemId : 'image-data-view',

Locally paging on Extjs 5 store of type ajax

纵饮孤独 提交于 2019-12-07 14:42:31
问题 I am working on an app where loading all data from the beginning is not really an inconvenient. I am getting json data from a server through Ajax, and my store for doing that is pretty simple: Ext.define('MODIFE.store.CentroBeneficio', { extend : 'Ext.data.Store', requires : [ 'MODIFE.model.CentroBeneficio' ], storeId : 'CentroBeneficio', model : 'MODIFE.model.CentroBeneficio', page-size: 10, proxy :{ //type: 'memory', type: 'ajax', enablePaging: true, url: 'http://'+MODIFE.Global.ip+'

EXTJS 5 Load a VERY SIMPLE string array in store

这一生的挚爱 提交于 2019-12-07 05:21:43
问题 I have a back end service that gives me an object which only contains an array of string. This is for example what the service gives me: { "DepartementsResult": [ "AME-CM", "BMAU", "BMKR", "BNVS" ] } So to get this data I want to create a nice and simple store, but a first problem appear: what should be the field??? var store = Ext.create('Ext.data.Store', { fields: ['data'], // What should be the fields here, I have none ^^" pageSize: 0, autoLoad: false, proxy: { type: 'ajax', url: 'data

Scrolling issues with ExtJS 5 app inside IFrame

可紊 提交于 2019-12-06 20:22:47
问题 Hy, this is what my test page looks like: The blue area is the parent page and the green area is an IFrame which runs an ExtJS application (simple viewport with a label inside). If the site is executed on a touch device (IPad, Android Tablet etc) it's not possible to scroll the page by "wiping" on the IFrame (the green area). One has to wipe on the blue area to scroll the page. This had been working correctly in ExtJS v4.2.1 (see links below). Test-Sites: https://skaface.leo.uberspace.de

App folder is not loading in Ext.appliation when i try to test using jasmine

随声附和 提交于 2019-12-06 19:04:23
问题 I am trying to implement jasmine in my application(Ext js 5)for unit testing. For that i have created app-test file. Ext.require('Ext.app.Application');Ext.Loader.setConfig({enabled:true}); Ext.onReady(function() { var Application = Ext.create('Ext.app.Application', { name: 'epmct', appFolder:'app', launch: function() { Ext.create('epmct.view.vpp.dashboard.VppDashboardMainPage'); } }); }); When i run the application throught specrunner.html(File to start unit testing ) I am getting error

ExtJS5: Get rid of root property in proxy

不羁的心 提交于 2019-12-06 08:59:28
问题 I'm trying to connect a REST API to my ExtJS application. For GET /user alike requests I return a response as follows: {items: [{id: 1, ...}, {id: 2, ....}], total: 2} So I created a model for that: Ext.define('model.User', { extend: 'Ext.data.Model', fields: [ { name: 'id', type: 'int' }, { name: 'name' }, ], proxy: { reader: { type: 'json', totalProperty: 'total', rootProperty: 'items' }, type: 'rest', url: '/Api/User', } }); The grids load data and all look perfect. Now I want to be able

ExtJs 5 grid store/viewmodel binding: Cannot modify ext-empty-store

放肆的年华 提交于 2019-12-06 06:27:53
I'm pulling my hair out on this one... I have a view with some grids, a store and a viewModel. I need different filtered versions of the store in different grids, so I'm trying to bind each filtered store to a grid. Now I can't even get a store to load in a grid in the first place... Here's what my code looks like: Store: Ext.define('My.store.Admin.Kinder', { extend: 'Ext.data.Store', model: 'My.model.Kind', storeId: 'adminKinderStore', alias: 'store.adminKinder', proxy: { type: 'ajax', method: 'post', url: '/getKinder', reader: { type: 'json', rootProperty: 'kinder' } } }); ViewModel: Ext

Locally paging on Extjs 5 store of type ajax

*爱你&永不变心* 提交于 2019-12-06 01:47:28
I am working on an app where loading all data from the beginning is not really an inconvenient. I am getting json data from a server through Ajax, and my store for doing that is pretty simple: Ext.define('MODIFE.store.CentroBeneficio', { extend : 'Ext.data.Store', requires : [ 'MODIFE.model.CentroBeneficio' ], storeId : 'CentroBeneficio', model : 'MODIFE.model.CentroBeneficio', page-size: 10, proxy :{ //type: 'memory', type: 'ajax', enablePaging: true, url: 'http://'+MODIFE.Global.ip+'/CentroBeneficio/GetCentroBeneficios' }, autoLoad: true }); This is my model: Ext.define('MODIFE.model