extjs4

How to perform View-Controller separation when using an “actioncolumn” (Ext.grid.column.Action)

大城市里の小女人 提交于 2019-12-09 06:15:47
问题 In ExtJS 4, I have a grid that contains an action column. Whenever that action is triggered, I want to execute "my action". Without MVC, this would look like this: /* ... */ { xtype: 'gridpanel', columns: [ /* ... */ { xtype: 'actioncolumn', items: [{ handler: function(grid, rowIndex, colIndex) { // my action } }] } ] } Now I want to introduce the View-Controller separation. So I have to move the handler from the View to the Controller. But how does the controller register its method to the

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:

Process after grid was loaded completely using ExtJS

▼魔方 西西 提交于 2019-12-08 16:35:20
问题 I am using ExtJS to load data to a grid, and I want to add some additional processes after data was put on grid completely. My context is, after data was put on grid, I will check all rows, and mark some of them as disabled based on a specified condition and put tooltip to row (explain why it is disabled). I tried to use 2 events: 'afterrender' of Grid, and 'load' of grid's store, but they did not work. Because grid's 'afterrender' was fired when first grid initialization, not concern to data

Window dragging issue in IE

∥☆過路亽.° 提交于 2019-12-08 16:00:28
问题 ExtJS 4 I want my Ext.Window to be dragged outside the browser boundary. So I removed the scroll bars of the browser as document.documentElement.style.overflow = 'hidden'; // firefox, chrome document.body.scroll = "no"; // ie only In firefox its working fine. But in IE, whenever I drag the window outside, it is again snapped within the browser window. I want this (case 1) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | | | | | | | | | --window---- | | A | B | | -----+------ | | | | ~~~~~~~~~~~~~~~~~

ExtJS 4 - How to disable 'next' & 'last' icons in the paging toolbar when no records present in grid?

我是研究僧i 提交于 2019-12-08 12:13:19
问题 I have a grid with paging toolbar at the bottom and a 'Load' button at the top which can be used to load records in the grid. Thus, initially there are no values present in the grid, but in such condition too the paging toolbar displays Page 1 of 1, and also the icons to go to 'next' or 'last' page are enabled. Due to this, when user clicks any of these icons, then, though the records are not loaded but internally the values of 'page' and 'start' are set as NaN and if then user clicks at

extjs 4 combobox , How to disabled tab and enter key

倾然丶 夕夏残阳落幕 提交于 2019-12-08 11:06:31
问题 I am using extjs 4.0.7. I want to disabled tab and Enter key event when user using Combobox. I have tried to use keyUp and KeyDown event. But I didn't get any alert for it. Here is my code: { xtype: 'combo', store: ds, id:'UserBO_SelectComponentId', displayField: 'displayName', valueField: 'userId', typeAhead: false, hideLabel: true, disabled: false, hideTrigger:true, multiSelect:true, delimiter: ";", anchor: '100%', triggerAction: 'all', listeners: { change: function( comboField, newValue,

extjs 4.0 inconsistent window.open() behavior when called within Ext.Ajax.request() [duplicate]

核能气质少年 提交于 2019-12-08 10:08:48
问题 This question already has an answer here : Closed 7 years ago . Possible Duplicate: window.open(url) different behavior - same code, different timing I'll let my code snippet explain the issue I'm seeing. function myFunction() { window.open('http://www.yahoo.com'); // --> this opens a new tab on my browser Ext.Ajax.request({ url: 'PHP function call', success: function(response) { window.open('http://www.yahoo.com'); // --> this opens a new window, not tab } }); } This is very strange. From

How to show data in Extjs grid.panel

妖精的绣舞 提交于 2019-12-08 09:21:37
问题 Is this the correct way to initialize my view? I have this code: Ext.define('AS.view.View', { extend: 'Ext.grid.Panel', alias: 'widget.view', store: 'Store', initComponent: function () {} }); The store is configured on the grid, shouldn't I see data?. Can someone help me? 回答1: You should put this.callParent(arguments); in the initComponent method You can either autoload the store or call load() on the store when your view renders. Either: //store config autoLoad: true or //view config

Ext.grid.Panel in Ext 4 not loading data from Ext.Direct proxy store

不打扰是莪最后的温柔 提交于 2019-12-08 08:45:26
问题 I've eliminated all exceptions from this code. However, the data from my proxy isn't rendering in my Ext.grid.Panel widget. Below you will find the different components of the page as it renders. I did not include the server-side stack code for the Ext.Direct proxy. HTML: <!doctype html> <html> <head> <meta charset="utf-8"> <title>Ext Direct Grid Integration</title> <link rel="stylesheet" type="text/css" href="http://www.rasc.ch/extjs-4.1.3/resources/css/ext-all.css" /> <link rel="stylesheet"

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',