extjs4.1

extjs4 get instance of view in controller?

亡梦爱人 提交于 2019-12-24 13:30:36
问题 I am trying to get an instance of my view within the controller. How can I accomplish this. The main reason I am trying to do this is that I have a grid in my view that I want to disable until a selection from a combobox is made so I need to have access to the instance of the view. Help? My controller: Ext.define('STK.controller.SiteSelectController', { extend: 'Ext.app.Controller', stores: ['Inventory', 'Stacker', 'Stackers'], models: ['Inventory', 'Stackers'], views: ['scheduler.Scheduler']

How to wrap long radiobutton label in extjs

会有一股神秘感。 提交于 2019-12-24 12:06:09
问题 My above radion button wraps the label, but it is not aligned properly. It should align right below the first text on the top. Is there a config I have to set inorder for the labels to wrap correctly. 回答1: Im pretty sure there is no config to do this. Only reasonable way is by fiddling with CSS - How to align checkboxes and their labels consistently cross-browsers +In current version (4.2.1.), there is a bug, which wraps whole label text under the radio (see here). 回答2: By looking at what

select row only when checkbox is clicked ExtjS 4

南笙酒味 提交于 2019-12-24 00:46:10
问题 In an ExtJS 4.1 grid that uses CheckboxModel as a selection model, when you click on an entire row, that row is selected (and the corresponding checkbox is checked). Is there a way that I can prevent that default behaviour from happening and permit row selection only when the checkbox for a corresponding row is clicked (as opposed to when clicking the entire row)? Again I'm using ExtJS version 4.1 Thanks for any help Note: My grid also has the CellEditing plugin attached to it. I don't want

Move an object (element) one step up with Javascript

不想你离开。 提交于 2019-12-23 17:01:09
问题 I have several objects like this: I want to move type and value one step up so they will be next to field , and then delete data . It looks like this when departments is converted to JSON: [ {"field" : "DEPARTMAN_NO", "data" : { "type":"numeric" , "comparison":"eq" , "value":11 } }, {"field" : "DEPARTMAN_ADI", "data" : { "type":"string" , "value":"bir" } } ] I have tried: departments = grid.filters.getFilterData(); i = {}; for(var i in department) { department = i.data; delete.department.data

Add Flex value dynamically to controller in extjs

谁说我不能喝 提交于 2019-12-23 16:34:42
问题 I am giving some items (containers), in "View", a layout of hbox . Now I want to give flex value to each item through the "Controller". How can I do this? I have gone through the docs but can't find any method like setFlex . EDIT : Ext.apply(Ext.getCmp('IdHere'), {flex: 1}); I have got the answer from this link. But now the problem is that even I am changing the flex values dynamically, the view of the containers is not changing. It is remaining same. I am not assigning flex values initially

Design sudoku using extjs

坚强是说给别人听的谎言 提交于 2019-12-23 16:34:31
问题 I am very new to extjs. I am trying to design sudoku game using extjs. Till now I have done the following: Ext.onReady(function() { var i = 0, items = [], childItems = []; for (i = 0; i < 9; ++i) { childItems.push({ xtype: 'container', height: 50, style: { borderColor: '#000000', borderStyle: 'solid', borderWidth: '1px', width: '40px' } }); } for (i = 0; i < 9; ++i) { items.push({ xtype: 'container', height: 150, layout: { type: 'column' }, style: { borderColor: '#000000', borderStyle: 'solid

How to create hyper link in ExtJS 4?

倾然丶 夕夏残阳落幕 提交于 2019-12-23 07:25:37
问题 I am working in ExtJS 4.I have been getting stuck at a point where I have to create a hyperlink in ExtJS 4.I have been searching a lot for creating hyperlink in ExtJS 4 but I did not get any solution for it.Actually I have to create a hyperlink and after clicking on that link I am going to display another page in ExtJS 4. Actually also i did not get the event in ExtJS 4. How can I use hyperlink in ExtJS 4. I am using this way... { xtype: 'panel', html:'<a href="second.js">Second page</a>', }

How to create hyper link in ExtJS 4?

风格不统一 提交于 2019-12-23 07:25:24
问题 I am working in ExtJS 4.I have been getting stuck at a point where I have to create a hyperlink in ExtJS 4.I have been searching a lot for creating hyperlink in ExtJS 4 but I did not get any solution for it.Actually I have to create a hyperlink and after clicking on that link I am going to display another page in ExtJS 4. Actually also i did not get the event in ExtJS 4. How can I use hyperlink in ExtJS 4. I am using this way... { xtype: 'panel', html:'<a href="second.js">Second page</a>', }

ExtJS 4, Different rows fields

狂风中的少年 提交于 2019-12-23 02:37:11
问题 It's possible to have "by-row" columns definition in a Grid? For example, I need a grid like this: id | name | options ====================================== int | string | combobox(1,2,3) int | string | combobox(1,2,3,4,5) int | string | combobox(1,2,3) int | string | combobox(5,6,7) The combobox possible values are defined for that column in the initialization...is there a way to define that per row or perhaps some method to define after the rendering? 回答1: You have several options here.

How to skip over particular cells when tabbing through an Ext grid?

戏子无情 提交于 2019-12-22 16:11:21
问题 I have a grid panel where some cells are editable, and others aren't. I'd like to make it so that when you tab through the grid with your keyboard, the non-editable cells are skipped over i.e. never get selected. Here's my simple grid so far: var store = Ext.create('Ext.data.Store', { fields:['name', 'age', 'country'], data:[ {name:'Lisa', age:13, country: 'USA'}, {name:'Bart', age:75, country: 'France'}, {name:'Homer', age:32, country: 'Germany'}, {name:'Marge', age:56, country: 'Australia'}