extjs4

ExtJS 4 TreePanel autoload

不羁岁月 提交于 2019-12-22 05:26:46
问题 I have an Ext.tree.Panel which is has a TreeStore . This tree is in a tab. The problem is that when my application loads all of the trees used in the application load their data, even though the store is on autoLoad: false . How could I prevent autoloading on the tree? Ext.define('...', { extend: 'Ext.container.Container', alias: 'widget.listcontainer', layout: { type: 'vbox', align: 'stretch' }, items: [{ xtype: 'container', html: "...", border: 0 }, { xtype: '...', flex: 1, bodyPadding: 5,

Extjs 4 checkcolumn not visible

纵饮孤独 提交于 2019-12-22 04:20:23
问题 I have a an Grid with a column that must be a checkcolumn, i use this code there are two rows in the grid but the checkcolumn looks empty. When i click on the checkcolumn the console.log returns correctly the changed boolean. But i see nothing in that column. xtype: 'checkcolumn', header: 'REDACTEUR', dataIndex: 'REDACTEUR', width: 75, editor: { xtype: 'checkbox' }, renderer : function(value) { console.log(value); 回答1: you have to manually include the css for the checkcolumn xtype like this:

How to prevent extjs grid from scrolling when clicking on a cell?

懵懂的女人 提交于 2019-12-22 04:03:57
问题 I am currently using the grid component with Extjs 4 based on the editable grid example. I would like to have a link associated with each cell so that when I click on a cell it takes me to another page. However, when there is a vertical scroll that is trigered on the page when clicking on the link. e.g. try reducing the size of http://dev.sencha.com/deploy/ext-4.0.0/examples/grid/cell-editing.html, the first click on the grid scrolls the page so that the grid is on the center and the event is

extjs grid - how to make column width 100%

↘锁芯ラ 提交于 2019-12-22 03:17:39
问题 The property width is a pixel width. { xtype: 'grid', store: store, selModel: Ext.create('Ext.selection.CheckboxModel', { mode: 'SINGLE' }), layout: 'fit', columns: [ { text: "pum", dataIndex: 'SRD_NAME_FL', width: 400 } ], columnLines: true } if i have only one column how can i make column width = 100% or if i have several columns - how to make last column stretch to end of grid? 回答1: For ExtJS3, set forceFit on the GridPanels viewConfig . See: http://dev.sencha.com/deploy/ext-3.4.0/docs/

ExtJs4 Json TreeStore?

霸气de小男生 提交于 2019-12-21 23:01:42
问题 I am migrating my ExtJs3 application to ExtJs4. In ExtJs3 I had a tree grid which had a loader to load the tree data, like below: loader: new Ext.tree.TreeLoader({ dataUrl: 'Department/DepartmentTree', nestedRoot: 'Data.items' }) So I am trying to create a treeStore in ExtJs4 like below: var store = Ext.create('Ext.data.TreeStore', { model: 'DepartmentTreeModel', folderSort: true, proxy: { type: 'ajax', url: 'Department/DepartmentTree', reader: { type: 'json', root: 'Data.items' } } }); I get

ExtJS4 store proxy url override

烂漫一生 提交于 2019-12-21 21:43:00
问题 I am trying to reuse a store by altering proxy url (actual endpoint rather than params). Is it possible to override proxy URL for a store instance wih the following syntax: { ...some view config ... store: Ext.create('MyApp.store.MyTasks',{proxy:{url:'task/my.json'}}), } if proxy is already well defined on the Store definition? EDIT : AbstractStore source code sets proxy the following way if (Ext.isString(proxy)) { proxy = { type: proxy }; } SOLUTION : store.getProxy().url = 'task/myMethod

How to manage PagingToolbar in Ext-js 4.2 correctly?

笑着哭i 提交于 2019-12-21 21:36:26
问题 js 4.2), and I've got some problems when I manage a toolbar on a grid which use a Proxy (ajax). this.grid = new Ext.create('Ext.grid.Panel',{ region : 'center', loadMask : true, layout : 'fit', store : 'Contenedores', tbar: [ { text: 'Exportar Excel' }, '->', { text:'Buscar', handler: this.buscar, scope: this}, '-', { text:'Limpiar', handler: this.limpiar, scope: this} ], columns : [], bbar : new Ext.create('Ext.toolbar.Paging',{ store: 'Contenedores', displayInfo: true, displayMsg :

ExtJS4: Accessing global variables from Ext.Application

杀马特。学长 韩版系。学妹 提交于 2019-12-21 20:33:05
问题 I want to load some application specific settings and save them as global variables when the application is loaded. I have found how to create and access global variable here. This is how my app.js looks like: Ext.application({ stores: [ ... ], views: [ ... ], autoCreateViewport: true, name: 'MyApp', controllers: [ 'DefaultController' ], launch: function() { ... } }); Is it possible to set these variables inside launch: function() block? If not, are there any alternatives? 回答1: You can also

Under ExtJS 4 is there a way to load external components?

馋奶兔 提交于 2019-12-21 18:44:11
问题 I am trying to set up my ExtJS 4 project so I have three top level applications, for example, /foo/app.js /bar/app.js /baz/app.js Each 'top level' application is a separate ExtJS application, each with their own loaders. There are some cases were I will have general components that I want to share between all three applications, so I have /components top level directory. If I have a component name say ComponentA, /components/componenta.js How would I go about getting ComponentA into all three

Autosizing textfield label in ExtJS

会有一股神秘感。 提交于 2019-12-21 13:40:10
问题 In ExtJS, is it possible to have the label of a textfield optimally sized to fit its text in one line? The labelWidth property doesn't have an auto setting, and leaving it out completely has same effect as specifying the default value 100, which will cause a lengthy text to break over multiple lines: http://jsfiddle.net/Qbw7r/ I would like to have the label just as wide as it takes to contain the whole text without wrapping, and the editable field fill up the rest of the available width. 回答1: