extjs4.1

Extend from custom model class in ExtJS 4

ぃ、小莉子 提交于 2019-12-09 15:45:09
问题 How to extend from custom model in extjs. Is there any method which can directly club the fields of User and BusinessUser fields when I'll refer the fields from BusinessUser class in example below. Ext.define('User', { extend: 'Ext.data.Model', fields: [ {name: 'name', type: 'string'}, {name: 'age', type: 'int'}, {name: 'phone', type: 'string'}, {name: 'alive', type: 'boolean', defaultValue: true} ], }); Ext.define('BusinessUser', { extend: 'User', fields: [ {name: 'businessType', type:

Extjs 4.1 many-to-many model association

蹲街弑〆低调 提交于 2019-12-09 13:26:43
问题 i face some problem when i want create many-to-many association. because it do not know. i try to create relationship in this way. but i am not sure. any man can help me? how can i do it?. here is my code Ext.define('Ext4Example.model.Category', { extend : 'Ext.data.Model', alias : 'widget.categoryModel', idProperty: 'id', fields: [ {name:'id', mapping:'id', type:'int'}, {name:'name', mapping:'name', type:'string'} ], proxy: { type: 'ajax', noCache: false, api: { create : '${createLink

How to tackle ExtJS “Synchronously loading” warning

为君一笑 提交于 2019-12-09 12:06:39
问题 When using ExtJS 4+ with asynchronous loading one would be familiar with this sort of warning: [Ext.Loader] Synchronously loading 'MY.particular.module'; consider adding Ext.require('MY.particular.module') above Ext.onReady How to identify which JavaScript module (be it a controller, a component, etc) is causing this warning? I.e. the place where include module being synchronously loaded in the requires list. What is the right way to go around correcting these warnings? Does an automated way

Always show the tip text of Slider in Extjs

只谈情不闲聊 提交于 2019-12-08 16:54:07
问题 In Extjs 4.1.1a, How to keep the tip text of the slider always visible? Currently, the tip text is being visible whenever the user drags the bar of the slider. I searched on docs but couldn't find any related concepts. If it is not documented or not possible , then please explain me how to create the tip text manually. The tip text should move along the bar of the slider and it should not overcome or hide any other adjacent components. Here is my code which generates a simple slider: xtype:

Firing application wide events from button handlers

…衆ロ難τιáo~ 提交于 2019-12-08 14:16:01
问题 I have this gridPanel: Ext.define('BM.view.test.MacroList', { extend: 'BM.view.GridPanel', alias:'widget.macro-test-list', store: 'Tests', initComponent: function() { this.columns = [ { xtype:'actioncolumn', width:50, items: [ { icon: 'images/start.png', tooltip: 'Start Test', handler: function(grid, rowIndex, colIndex) { this.application.fireEvent('testStart', grid.getStore().getAt(rowIndex)); // application not defined here because 'this' is the button. }] }] } } stratTest is a function

Hiding grid columns change height of rows

烈酒焚心 提交于 2019-12-08 09:37:14
问题 I have quite annoying problem with hiding grid columns dynamically. After I hide columns (with long text in cells), the height of grid rows dramatically increases. Before hide and after hide operation As You can see first row is definitely too high. Probably the reason of that behavior is the fact, that I use text wrap in grid cells. .x-grid-cell-inner { white-space: normal; } Is there any efficient way to make grid rows, not to change their height after hiding columns (and using textwrap ) ?

Create table like structure using Extjs

爱⌒轻易说出口 提交于 2019-12-08 08:34:56
问题 In Extjs 4.1.1a, I am trying to create a table like structure using containers or panels which completely stretches horizontally and vertically to its parent component. Here is the Example Fiddle In View : Ext.define("MyApp.view.Main", { extend: 'Ext.panel.Panel', layout: {type: 'vbox',align:'stretch'}, title: 'hello', id: 'mainContainer' }) In Controller : var items = []; for(var i=0;i<6;i++){ var vContainer = []; var hContainer = []; for(var j=0;j<7;j++){ hContainer.push({ xtype: 'panel',

Remove and Add Gridpanel again fail with CheckboxModel in extjs4.1 and 4.2

ⅰ亾dé卋堺 提交于 2019-12-08 08:26:54
问题 I have a panel with layout: border , that look like http://jsfiddle.net/rpcbX/ When i click add button on west region I with removeAll from center region and add something again, in this example i add and remove gridpanel. But My gridpanel has CheckboxModel . And that can't remove after i add gridpanel again. Follow bellow step u will see bug. 1. Run my app and click add button 2. Click checkall butoon on gridpanel 3. Click add button again Now u will see the bug, the selection was selected

How to show label with line and display label outside in piechart in extjs4.1

梦想与她 提交于 2019-12-08 05:22:45
问题 can anybody tell How to show label with line and display label outside in extjs4.1.I want to display label outside of pie and show line to map the label eg / \ \ test test1 test2 回答1: You've got the display option of the label config, that you can set to 'outside'. As for the lines, you'll have to draw them yourself... Which would be a quite involved hack IMO. If you're interested in trying, that takes place in Ext.chart.Label#renderLabels(), and uses Ext.chart.series.Pie's onCreateLabel()

How to create custom SASS in ExtJS for compiling with Sencha CMD

╄→гoц情女王★ 提交于 2019-12-08 04:09:11
问题 I have my application built with ExtJS 4.2.1 My app structure was generated using Sencha Cmd v4.0.1.45. Im using some custom CSS in my app to give personalized style so my XTemplate items and also Im using AwesomeFont and FamFam Sprites for icons. This is my resources directory in my app sencha cmd structure: App.css is a custom CSS BoxSelect.css is other custom CSS chooser.css is other custom CSS famfamfam.css is the CSS that will handle the famfam.png image sprite font.css is the CSS that