extjs4.2

ExtJs 4.2: 'id' of Controller

一笑奈何 提交于 2019-12-11 12:58:21
问题 I have set the 'id' config of controller like Ext.define('App.controller.popUpController', { extend: 'Ext.app.Controller', /** * @cfg {String} view * View for which popUpController will act as a controller */ view: [ 'PopUpWindow' ], id:'testController' }) But when I am trying to retrieve id of controller to pass it to Ext.app.EventBus.unlisten(App.app.getController('popUpController').id) It is returning name of controller: 'popUpController' not the id: 'testController' . Although I am

Extjs How can I change the 'style' of Ext.form.Label

橙三吉。 提交于 2019-12-11 05:17:17
问题 I know that I can set the style property of the label when creating it, but I want to change the style at run time, how can I do that? the user pick: font, color, bg color and I want to change the existing label style as user desire. thank you? 回答1: You can apply styles: yourFormPanel.getForm().findField("field_name").labelEl.setStyle({"color":"red"}); or add/remove css classes: yourFormPanel.getForm().findField("field_name").labelEl.addCls("red-label"); yourFormPanel.getForm().findField(

Change field labels on an ExtJS chart

怎甘沉沦 提交于 2019-12-11 05:12:12
问题 How would I go about changing the axes labels in an ExtJS chart? Specifically, I'm brining data in via proxy, and it's populating with the fields as they are labled in the database. I want to customize them, even if they have to be static. Here's the code from the ExtJS site: var panel1 = Ext.create('widget.panel', { width: 800, height: 400, title: 'Stacked Bar Chart - Movies by Genre', renderTo: Ext.getBody(), layout: 'fit', items: { xtype: 'chart', animate: true, shadow: true, store: store,

dockedItems - text from Panel

放肆的年华 提交于 2019-12-11 04:54:10
问题 I have Tree panel. everything works!; Ext.define('My.Tree', { extend:'Ext.tree.Panel', id: 'DriveTree', store: storeTree, ChooseButtonText: 'ChooseFolder', dockedItems: [{ xtype: 'toolbar', items: [{ text: 'BUTTON TEXT', // this.ChooseButtonText id:'connectButton', handler: function(){ alert(this.ChooseButtonText); } }, ] }], }); Ext.onReady(function(){ var tree =Ext.create('My.Tree', {}); }); But text of dockedItems want to be from Panel. something like this: text:this.ChooseButtonText each

Extjs4 MultiLevelGrouping Grid and being able to print it

廉价感情. 提交于 2019-12-11 04:06:54
问题 I was trying to print an ExtJs grid and found rahul singla post: http://www.rahulsingla.com/blog/2010/10/extjs-printing-gridpanels-with-groupingview-and-groupsummary-plugin which led me to Ed Spencer Printer class, wich led me to Loaine's ExtJs4 version https://github.com/loiane/extjs4-ux-gridprinter which is absolutely great, so far so good, but the grid I'm trying to print has a multilevel groupingsummary feature for wich I used this UX http://www.sencha.com/forum/showthread.php?265814

Ext.window.MessageBox draggable false, error calling hide method

丶灬走出姿态 提交于 2019-12-11 03:07:22
问题 After creating an instance of MessageBox like this var msgBox = Ext.create('Ext.window.MessageBox',{draggable: false}); -actually draggable false was set through an override to Ext.window.Window, I'm putting it like this to make it easier to reproduce. - also I do prefer the singleton syntax but there are already a ton of instances created like this in the code I'm working on. msgBox.alert("I am a bug, try to close me to reproduce"); Trying to close this MessabeBox calls the hide method: hide

ExtJs - paging and buffering grid based on remote data WITHOUT remote paging and filtering

一笑奈何 提交于 2019-12-11 02:56:43
问题 In ExtJs, remote data can be easily displayed in a paged grid. But for this to happen, the server side must support paging. Furthermore, local sorting and filtering in a paged grid is not useful, because it only filters the elements of the current page. In order to get consistent results, remote filtering and sorting is required. For buffered stores in infinite scrolling grids the same applies. But this is not always the right solution. Especially when remote data retrieval takes some time,

Position a constrained Window relative from the center and top of the constraining container

泄露秘密 提交于 2019-12-11 01:55:35
问题 We need to position a constrained Window (like in this example) relative from the top and the center of the container where it is constrained to. But in the config we only found x and y which would require to calculate the center on each document change. Isn't there any other way to archive this? 回答1: You could use alignTo() docs alignTo(element, [position], [offsets], [animate] ) Aligns the element with another element relative to the specified anchor points. If the other element is the

ExtJS Grid renders more rows than specified in pagesize

我的梦境 提交于 2019-12-10 19:38:29
问题 I have implemented an infinite grid based on the example given by Sencha. Basically the proxy fetches json files using jsonp and populates the grid. I want the grid size to be 10 and I want the proxy to make subsequent requests only when the user scrolls down closer to the 10th record. Each record takes sufficient space vertically in the grid view, and only about 5 records can be seen without scrolling (on my 14 inch laptop with a resolution of 1366 x 768). I have set the pagesize to be 10,

Mootools and ExtJs 4.x seem to be incompatible, how to solve?

十年热恋 提交于 2019-12-10 16:42:56
问题 Mootools and ExtJs have a compatibility issue when used on the same page. Mootools throws the following error : Uncaught TypeError: Property 'id' of object #<HTMLDocument> is not a function How can we use both frameworks side by side ? Is there a workaround ? 回答1: This looks like a document.id('..') reference issue, it is defined but it's not the mootools method... Nothing will work if it's not pointed to the mootools method. I would argue that ExtJS or your app has added a property id to