extjs

How to have headers in first column instead of regular headers in top row?

两盒软妹~` 提交于 2020-01-05 15:25:34
问题 Generally, ExtJS renders the JSON into grid considering that properties go to top columns and their number is fixed. And the corresponding values are loaded in rows as records.Here number of rows may vary depending upon the records in Json. But there is slight change in my requirement. I want the properties to go to first row and corresponding columns. Here number of columns may vary depending upon the records in Json. I want to render something like depicted below : +-----------------+------

getController() doesn't load file and doesn't fire init and lauch

跟風遠走 提交于 2020-01-05 12:34:11
问题 i want to load some controllers at runtime only in special cases. In this video http://de.slideshare.net/senchainc/mvc-in-depth-part-2-tommy-maintz/ is said that you can do this with getController. If the controller is not loaded at this time the file is loaded and init and launch of the controller are fired. But if i try this: var myController = this.getApplication().getController("MyController"); myController.test(); //-- Uncaught TypeError: Cannot call method 'test' of undefined

extjs How to get a grid

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-05 11:01:54
问题 In Designer I set my grid name to equal MyGrid On clicking the button addRecord is called, it fails where rows is attemting to get an undefined grid. How do I define this MyGrid so that it references the grid within the panel? Ext.define('MyApp.view.MyPanel', { extend: 'MyApp.view.ui.MyPanel', initComponent: function() { var me = this; me.callParent(arguments); var button = me.down('button[text=Submit]'); button.on('click', me.onSubmitBtnClick, me); }, addRecord: function(myRecordArray) { var

Save ajax response to file

家住魔仙堡 提交于 2020-01-05 10:05:13
问题 Let's assume I have following button code: Ext.create('widget.button', { handler: function () { Ext.Ajax.request({ method: 'POST', url: 'index.php?r=store/exportXLS', params: { queryName: me.exporting.name, queryGroups: Ext.JSON.encode(me.exporting.groups) }, success: function (response) { //??? } }); }, dock: 'top', text: 'Экспорт в XLS' }); Because groups variable hold too much parameters, I must send all data via POST. Action "store/exportXLS" returns valid html which I want to save as XLS

extjs editor grid update rails

青春壹個敷衍的年華 提交于 2020-01-05 09:48:28
问题 i am trying to update records displayed in editor grid..but instead of updating same record, a new record gets inserted into the database...what am i missing??pllzz help..following is my JsonStore code : Ext.data.Api.restActions = { create : 'POST', read : 'GET', update : 'PUT', destroy : 'DELETE' }; ProdStore = Ext.extend(Ext.data.JsonStore, { constructor: function(cfg) { cfg = cfg || {}; ProdStore.superclass.constructor.call(this, Ext.apply({ storeId: 'ProdStore', id:'ProdStore', url:

extjs editor grid update rails

你。 提交于 2020-01-05 09:48:10
问题 i am trying to update records displayed in editor grid..but instead of updating same record, a new record gets inserted into the database...what am i missing??pllzz help..following is my JsonStore code : Ext.data.Api.restActions = { create : 'POST', read : 'GET', update : 'PUT', destroy : 'DELETE' }; ProdStore = Ext.extend(Ext.data.JsonStore, { constructor: function(cfg) { cfg = cfg || {}; ProdStore.superclass.constructor.call(this, Ext.apply({ storeId: 'ProdStore', id:'ProdStore', url:

extjs editor grid update rails

妖精的绣舞 提交于 2020-01-05 09:47:36
问题 i am trying to update records displayed in editor grid..but instead of updating same record, a new record gets inserted into the database...what am i missing??pllzz help..following is my JsonStore code : Ext.data.Api.restActions = { create : 'POST', read : 'GET', update : 'PUT', destroy : 'DELETE' }; ProdStore = Ext.extend(Ext.data.JsonStore, { constructor: function(cfg) { cfg = cfg || {}; ProdStore.superclass.constructor.call(this, Ext.apply({ storeId: 'ProdStore', id:'ProdStore', url:

Adobe CQ EXTJS component data post to servlet

╄→гoц情女王★ 提交于 2020-01-05 09:32:20
问题 I got a EXTJS CQ component with two text fields and and button. When the "save" button clicked, the dialog data has to be submitted to custom sling servlet. Custom sling servlet will call a osgi service and finally saves data to crx using jcr api. Question : How to post the dialog data to servlet ? I am new to CQ, Thanks for any help! -Sri 回答1: I'm assuming when you say "save" you are referring to some custom button and not the "OK" button that saves the dialog data to the node. Add a handler

Adobe CQ EXTJS component data post to servlet

浪子不回头ぞ 提交于 2020-01-05 09:31:50
问题 I got a EXTJS CQ component with two text fields and and button. When the "save" button clicked, the dialog data has to be submitted to custom sling servlet. Custom sling servlet will call a osgi service and finally saves data to crx using jcr api. Question : How to post the dialog data to servlet ? I am new to CQ, Thanks for any help! -Sri 回答1: I'm assuming when you say "save" you are referring to some custom button and not the "OK" button that saves the dialog data to the node. Add a handler

ExtJS 6 - Bind disabled property to new records in a store

这一生的挚爱 提交于 2020-01-05 09:14:20
问题 I'm trying to enable/disable a button when the store getNewRecords() function return the length, but not work! bind: { disabled: "{!grid.getStore().getNewRecords().length}" } Fiddle: https://fiddle.sencha.com/fiddle/1sj5 Someone have idea to how resolve this? 回答1: You need to create a formula in your viewmodel: viewModel: { formulas: { hasNewRecords: function (r) { return this.getView().down("treepanel").getStore().getNewRecords().length > 0; } } } then you can use it for your bindings: bind: