extjs4

How to remove checkall option in extjs checkboxmodel?

北慕城南 提交于 2019-12-07 02:45:43
问题 How to remove check all option is extjs 4 checkboxmodel? Regards 回答1: When defining a grid (in 4.2.1), set this config option to: selModel: Ext.create('Ext.selection.CheckboxModel', { showHeaderCheckbox: false }), (The relevant part is showHeaderCheckbox :false ) 回答2: I have managed to hide it using pure CSS: Code: .x-column-header-checkbox {display:none;} 回答3: When you're creating your checkboxmodel , try specifying injectCheckbox: false into its configuration. From the API: Instructs the

How do I submit a form using a store under ExtJs?

你说的曾经没有我的故事 提交于 2019-12-07 02:40:02
问题 Is there a way to have a form submit create an object in a store under ExtJs 4? It seems strange to me that the grid is built completely around the store mechanism and I see no obvious way to plug a form into a store. But I am most likely just missing something. 回答1: You can add a model instance to a store upon form submit using this code: onSaveClick: function() { var iForm = this.getFormPanel().getForm(), iValues = iForm.getValues(), iStore = this.getTasksStore(); iStore.add( iValues ); },

ExtJS application not looking in the correct app folder

主宰稳场 提交于 2019-12-07 01:38:28
In this tutorial , there is code that reads: Ext.require('Ext.app.Application'); var Application = null; Ext.onReady(function() { Application = Ext.create('Ext.app.Application', { name: 'AM', controllers: [ 'Users' ], launch: function() { //include the tests in the test.html head jasmine.getEnv().addReporter(new jasmine.TrivialReporter()); jasmine.getEnv().execute(); } }); }); For me, this leads to a 404 when the application is looking for the application code. GET http://localhost:8000/AM/controller/Users.js?_dc=1394340001581 404 (File not found) Why is it using the application name (AM)

Click event on tree's children/node

坚强是说给别人听的谎言 提交于 2019-12-07 01:15:25
问题 I really confused by ExtJs tree object, something is wrong with my code but I don't know what. Consider I have this code: var store = Ext.create('Ext.data.TreeStore', { root: { expanded: true, children: [ { text: "detention", leaf: true }, { text: "homework", expanded: true, children: [ { text: "book report", leaf: true }, { text: "alegrbra", leaf: true} ] }, { text: "buy lottery tickets", leaf: true } ] } }); Ext.create('Ext.tree.Panel', { title: 'Simple Tree', width: 200, height: 150, store

extjs using up and down methods

落爺英雄遲暮 提交于 2019-12-06 19:04:31
问题 I'm trying to use up and down to call rather than Ext.getCmp but I'm not quite understanding it. I have this code listeners: { 'change': function(field, selectedValue) { // Ext.getCmp('wildAnimal').setValue(selectedValue); this.up('form').down('#wildAnimal').setValue(selectedValue); } } inside this larger code Ext.define('ryan', { constructor: function() { Ext.create('Ext.form.Panel', { bodyStyle: {"background-color":"green"}, name: 'mypanel', title: 'Animal sanctuary, one animal per location

App folder is not loading in Ext.appliation when i try to test using jasmine

随声附和 提交于 2019-12-06 19:04:23
问题 I am trying to implement jasmine in my application(Ext js 5)for unit testing. For that i have created app-test file. Ext.require('Ext.app.Application');Ext.Loader.setConfig({enabled:true}); Ext.onReady(function() { var Application = Ext.create('Ext.app.Application', { name: 'epmct', appFolder:'app', launch: function() { Ext.create('epmct.view.vpp.dashboard.VppDashboardMainPage'); } }); }); When i run the application throught specrunner.html(File to start unit testing ) I am getting error

ExtJs:Initializing a global variable

走远了吗. 提交于 2019-12-06 16:49:20
问题 I have a global variable which needs to be initialized when the store is loaded and needs to use that value in another store as follows var cp = 0; Ext.onReady(function() { Ext.define('Init', { singleton: true, cp: 0 }); Ext.define('loggedUserList', { extend: 'Ext.data.Model', fields: [ 'id', 'name' ] }); loggedUser = Ext.create('Ext.data.Store', { model: 'loggedUserList', autoLoad: true, proxy: { type: 'ajax', url: url+'/lochweb/loch/users/getLoggedUser', reader: { type: 'json', root:

ExtJS 4.1 “HoverButton” extension issue

隐身守侯 提交于 2019-12-06 16:17:50
问题 I am working on an extension of Ext.Button that enables the showing/hiding of a button's menu on mouseover/mouseout. It is working perfectly for the button's immediate child menu, however I am running into an issue with having it behave properly for any secondary/tertiary/ect menus. Right now, when the user moves over am item in the top menu that contains a menu, it will open the menu and the user can move the cursor into it with no problems, everything will stay open. If the user then moves

How to focus on editable textfield when checkbox is checked in ExtJS Grid?

試著忘記壹切 提交于 2019-12-06 16:07:49
I am creating a grid with checkcolumn and celledit. I have 3 columns 1 is for checkboxes and other is editable text field and 3rd is the productname, using celledit to edit the price. When I will check a checkbox on a record the focus should be on the textfield for that particular record. Here is the code sample: Ext.define('MyApp.view.EntryPage', { extend : 'Ext.grid.Panel', alias : 'widget.entryPage', title : 'Product Price Entry', store : 'ProductStore', loadMask: true, plugins: [Ext.create('Ext.grid.plugin.CellEditing', {clicksToEdit: 1})], initComponent:function(){ var me = this; this

How to create a field class containing an image in Ext JS 4?

那年仲夏 提交于 2019-12-06 14:47:28
i'm creating an application in Ext JS 4 and i'm stuck because i need a class containing an image to use into a form or a fieldset (like a regular textfield ); moreover the image will change depending on the value passed to the form. Something like an imagefield : Ext.define('Properties', { extend : 'Ext.form.Panel', alias : 'properties', bodyPadding: 5, // The fields defaultType: 'textfield', items: [{ fieldLabel: 'Device Name', name: 'deviceName' }, { xtype:'imagefield', fieldLabel: 'Status', name: 'status' } ],....... I've tried to extend Ext.form.field.Base without any success. Somebody can