extjs4

Stock chart in ExtJS 4

荒凉一梦 提交于 2019-12-19 09:24:51
问题 How can I draw an stock chart or a line chart with hundreds points? I disabled animation in regular line chart, but not successful and still too heavy and slow. 回答1: I've recently written a blog post on creating stock charts in Ext JS 4 - http://www.scottlogic.co.uk/2011/12/ext-js-4-stock-charts/. It uses a couple of hundred points and performs fine in modern browsers and isn't too bad in IE7-8. This said however, even after messing with the Ext JS build system, the minimum Ext build required

Loading hasMany data in ExtJS

我们两清 提交于 2019-12-19 05:49:22
问题 I'm trying to load 'nested' data in a hasMany relation in ExtJS4. My model looks like this: Ext.define("Entrypage.model.Entrypage",{ extend: "Ext.data.Model", fields: ['id','title','urlkey','text','picture','keywords', 'searchterms','description','critriamodus'], hasMany: {model: 'EntrypageCriterium',name:'brands'}, proxy: { type: 'ajax', url: '/Admin/extjson/entrypages', reader: {type:'json', root:'entrypages'} } }); And EntrypageCriterium : Ext.define("Entrypage.model.EntrypageCriterium",{

ExtJs 4: How do I hide/show grid columns on the fly?

一曲冷凌霜 提交于 2019-12-19 02:28:31
问题 I need to show/hide columns of a grid on the fly, but it seems that ExtJs 4 has no implemented method for that. In previous versions I should use columnModel, what doesn't exist anymore. Just get grid.columns[index] and hide() or show() doesn't affect the grid. Use grid.columnManaget.getColumns()[index].hide() can really hide the column, but it cannot be shown again (as getColumns() does not return that column after that). 回答1: The following should work: Ext.create('Ext.grid.Panel', { title:

Rearrange items of DataView with Drag and Drop

自古美人都是妖i 提交于 2019-12-18 18:20:55
问题 I have an ExtJS DataView with following template: <ul> <tpl for="."> <li class="report-field" id="{listId}"> {[this.getReorderLinks(values, xindex, xcount)]} <span class="field-title small" data-qtip="{displayName}">{displayName}</span> <i class="field-remove" title="' + deleteLabel + '"></i> </li> </tpl> </ul> Which makes each list of items look like this: Where user can click on different icons and perform related action, moving up/down in order and remove. Note that these items are added

Applying loadMask() to a single element in extjs?

烂漫一生 提交于 2019-12-18 11:53:47
问题 How to apply loadMask to only one element, and not the whole browser width-height? default here, only one element is masked, and a messageBox is in center, inside this element and not the whole display... any ideas? EDIT: @Molecule , thanks, but this is when data is loading from some source, what i need is : { xtype:"button", text:"Alert", handler: function(){ Ext.Msg.show({ title:'Save Changes?', msg: 'You are closing ?', buttons: Ext.Msg.YES, setLoading: // here somehow only mask parent

ExtJs4 - Store baseParams config property?

允我心安 提交于 2019-12-18 11:47:49
问题 In extjs3.x I used the stores baseParams config property to specify parameters used to load the store. This property no longer exists in extjs 4. What should I do instead of this? Also in extjs3 I was able to specify wether the stores proxy was a GET or a POST method by using the proxy method config property. What should I do instead of this? My ExtJs 3 code -> var store = new Ext.data.JsonStore({ root: 'Data', baseParams: { StartDate: '', EndDate: ''' },//baseParams proxy: new Ext.data

ExtJS, store, HasMany - BelongsTo and update process: howto?

梦想的初衷 提交于 2019-12-18 11:35:03
问题 I have two data models: Writer.AttributValeur and Writer.Produit . Writer.Produit has HasMany / BelongsTo relationship with Writer.AttributValeur . Thus the definition is like this: Ext.define('Writer.AttributValeur', { extend: 'Ext.data.Model', fields: [{ name: 'id', type: 'int', useNull: true }, 'description', 'val' ], belongsTo: 'Writer.Produit' }); Ext.define('Writer.Produit', { extend: 'Ext.data.Model', fields: [{ name: 'id', type: 'int', useNull: true }, 'titre', 'description' ],

how to make a full modal window in ext 4?

岁酱吖の 提交于 2019-12-18 11:34:54
问题 Like a window in microsoft OS (xp,vista, 7 etc)... If a main window create a modal window, the user can't access the main window, (including close and access the toolbar etc). I want to make a similar one with extjs. This is my modal example : Ext.create("Ext.Window", { title: 'aa', width: 200, height: 150, html: 'a', tbar: [{ text: 'aa', handler: function() { Ext.create("Ext.Window", { title: 'aa', width: 150, closable: false, height: 100, html: 'b', ownerCt: this, modal: true }).show(); } }

ExtJS, store, HasMany - BelongsTo and update process: howto?

蹲街弑〆低调 提交于 2019-12-18 11:34:15
问题 I have two data models: Writer.AttributValeur and Writer.Produit . Writer.Produit has HasMany / BelongsTo relationship with Writer.AttributValeur . Thus the definition is like this: Ext.define('Writer.AttributValeur', { extend: 'Ext.data.Model', fields: [{ name: 'id', type: 'int', useNull: true }, 'description', 'val' ], belongsTo: 'Writer.Produit' }); Ext.define('Writer.Produit', { extend: 'Ext.data.Model', fields: [{ name: 'id', type: 'int', useNull: true }, 'titre', 'description' ],

ExtJs4 how to disable all fields and all buttons on a panel recursively

自闭症网瘾萝莉.ら 提交于 2019-12-18 10:55:51
问题 I'm trying to disable all clickable, editable components on my panel. Calling panel.disable() grays it out, but buttons are still clickable. The same result gives panel.cascade with a function that disables each component. What is the right way to do this? 回答1: If you are using ExtJs 4.x , this is what you are looking for - myFormPanel.query('.field, .button').forEach(function(c){c.setDisabled(false);}); (Modify your selector based on the complexity of your form. You can just use .component