extjs5

Extjs 5, data model association & load nested data

孤者浪人 提交于 2019-12-05 12:28:16
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: [ { name: 'id', type: 'int' }, { name: 'address', reference: 'Address' }, { name: 'name', type: 'string' }

How can I listen for success in an Ajax Proxy in ExtJS 5?

坚强是说给别人听的谎言 提交于 2019-12-05 07:41:27
问题 I have a grid with the RowEditing plugin whose Store's AjaxProxy uses a JsonWriter to write updates back to the server. When an update occurs, I need to fire some code to update another component, which requires a separate trip to the server. This has to fire after the JsonWriter comes back, since it depends on the data being updated on the server. So, I can't listen for the store's "update" event, since that occurs before the Ajax call is made (even with batching disabled). I tried putting a

Scrolling issues with ExtJS 5 app inside IFrame

房东的猫 提交于 2019-12-05 01:30:55
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/ScrollTest/Ext510/ (not working as expected, using ExtJS v5.1.1) https://skaface.leo.uberspace.de

EXT JS 5.1 Minified Core Frame work when developing

杀马特。学长 韩版系。学妹 提交于 2019-12-05 01:30:19
问题 When developing I want to use a a minified .js file of Ext JS 5.1 like they do on Sencha Fiddle. It looks like you can use the cdn link from Sencha but when I use this in the index file it fails. Is there something I need to be doing in the bootstrap.js file to make it use just a link instead of the Ext Js 5 root folder? I want to use the same link for multiple apps hosted on a server for an enterprise situation. Also, the Chrome Dev Tools running super slow having to load each file. I want

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

风流意气都作罢 提交于 2019-12-05 00:32:26
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 Uncaught Error: [Ext.Loader] Some requested files failed to load. and I tried to set path using Ext.Loader

ExtJS5: Get rid of root property in proxy

女生的网名这么多〃 提交于 2019-12-04 12:27:07
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 to request a single record which my api serves as {id: 1, ...} . But when I do model.User.load(1) the

How can I listen for success in an Ajax Proxy in ExtJS 5?

心不动则不痛 提交于 2019-12-03 21:52:44
I have a grid with the RowEditing plugin whose Store's AjaxProxy uses a JsonWriter to write updates back to the server. When an update occurs, I need to fire some code to update another component, which requires a separate trip to the server. This has to fire after the JsonWriter comes back, since it depends on the data being updated on the server. So, I can't listen for the store's "update" event, since that occurs before the Ajax call is made (even with batching disabled). I tried putting a listener for "endupdate", as follows, but that again fires before the AJAX request is made: var ds =

EXT JS 5.1 Minified Core Frame work when developing

懵懂的女人 提交于 2019-12-03 16:35:52
When developing I want to use a a minified .js file of Ext JS 5.1 like they do on Sencha Fiddle. It looks like you can use the cdn link from Sencha but when I use this in the index file it fails. Is there something I need to be doing in the bootstrap.js file to make it use just a link instead of the Ext Js 5 root folder? I want to use the same link for multiple apps hosted on a server for an enterprise situation. Also, the Chrome Dev Tools running super slow having to load each file. I want to use one minified file to make this useful again. I'm not positive how you could use the cdn file

sencha extjs 5.0 app not working in production build

风流意气都作罢 提交于 2019-12-03 14:40:58
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 folder again manually in the production server. (I didn't find out how to change that in the build process

How to use Ext5 combobox with data bindings

时间秒杀一切 提交于 2019-12-03 08:37:10
I want to use a combobox which receives the preselected value from a data binding and also the possible options from a data binding of the same store. The panel items configuration looks like this: { xtype: 'combobox', name: 'language_default', fieldLabel: 'Default Language', multiSelect: false, displayField: 'title', valueField: 'language_id', queryMode: 'local', bind: { value: '{database.language_default}', store: '{database.languages}' } } If I use this configuration, the store of the combobox is invalid and unuseable. Is it possible to bind the selected option and also the available