extjs4.1

How to disable action column item for a single row?

假如想象 提交于 2019-12-03 12:29:37
问题 Consider this JSON sample : [{id:1,editable:true},{id:2,editable:false}] These records are about to be loaded in a store, then displayed inside a grid panel. This grid has an action column item for edition purposes. I'm looking for a way to disable the "edit" button only for the second row without performing computation after rendering. I'd like to use a built in feature which works like the renderer property rather than to loop through the store to update each row once the grid has been

Extjs - How to show combobox in Grid column

梦想的初衷 提交于 2019-12-03 04:57:17
I have a gridpanel include date and combo column jsfiddle But I don't want click to show my combo. I want show my combo without click, not hide inside cell like and the same for date column like I think chage to clicksToEdit: 0 but fail plugins: [ Ext.create('Ext.grid.plugin.CellEditing', { clicksToEdit: 1 }) ] How to do that, thanks The only way to achieve this in 4.2x or below is to use a custom component like Skirtle's comonent column http://skirtlesden.com/ux/component-column This column type will let you insert any arbitrary components into a cell. Upcoming release of ExtJS will have

ExtJs: Form isValid() is false. But how to know why the form is invalid?

女生的网名这么多〃 提交于 2019-12-03 04:25:23
问题 I am using an ExtJs form having a file upload field in it. On selecting a file I am calling the submit() method of the form. But before submitting I am checking if the form is valid or not using form.isValid() . Now due to some unknown reasons, I am getting form.isValid() as FALSE . But I want to know why the form validation is failing? I have kept all other fields as allowBlank: false . Is there a way to know (using a method or a config property) why the form validation is failing and what

How to close modal window extjs when clicking on mask?

放肆的年华 提交于 2019-12-03 03:12:59
If I create a modal window: Ext.define('myWindow', { extend: 'Ext.Container', alias: 'widget.myWindow', floating: true, modal: true, listeners: 'onMaskClick???': { close the window } ..... } How do I know when a user has clicked on the mask outside the window? In Sench Touch, there is a config hideOnMaskTap that lets me specify. What is the event/config for extJS? Tramway's case (sort of) works on modal or non modal windows. But not in case child components like the boundlist of a combobox float outside the windows boundaries. However if you use modal windows anyway you can listen for a click

How to disable action column item for a single row?

痞子三分冷 提交于 2019-12-03 02:54:05
Consider this JSON sample : [{id:1,editable:true},{id:2,editable:false}] These records are about to be loaded in a store, then displayed inside a grid panel. This grid has an action column item for edition purposes. I'm looking for a way to disable the "edit" button only for the second row without performing computation after rendering. I'd like to use a built in feature which works like the renderer property rather than to loop through the store to update each row once the grid has been rendered. Does ExtJS 4.1.1 provides this kind of feature? You can use set the isDisabled config (at least

ExtJs 4 - Load nested data on record save

我们两清 提交于 2019-12-02 07:06:30
问题 I have two Models. Master - Ext.define('App.model.Master', { extend : 'Ext.data.Model' ,fields : [ { name : 'master_name', type : 'string' }, { name : 'id', type : 'int'} ] ,proxy : { type : 'rest', url : '/master', reader : { type : 'json', root : 'masters' } } ,associations : [{ type : 'hasMany' id : 'id', foreignKey : 'master_id', associationKey : 'details', name : 'details', model : 'App.model.Detail', }] }); and Detail - Ext.define('App.model.Detail', { extend : 'Ext.data.Model' fields :

ExtJs 4 - Load nested data on record save

人盡茶涼 提交于 2019-12-02 04:31:51
I have two Models. Master - Ext.define('App.model.Master', { extend : 'Ext.data.Model' ,fields : [ { name : 'master_name', type : 'string' }, { name : 'id', type : 'int'} ] ,proxy : { type : 'rest', url : '/master', reader : { type : 'json', root : 'masters' } } ,associations : [{ type : 'hasMany' id : 'id', foreignKey : 'master_id', associationKey : 'details', name : 'details', model : 'App.model.Detail', }] }); and Detail - Ext.define('App.model.Detail', { extend : 'Ext.data.Model' fields : [ { name : 'detail_name', type : 'string' }, { name : 'id', type : 'int' }, {name : 'master_id', type

Uncaught Ext.AbstractManager.register(): Registering duplicate id

我与影子孤独终老i 提交于 2019-12-01 23:16:06
问题 In the application below, I am trying to add id 's to the generated items dynamically. My code works fine but when I add the below two commented lines in it. It throws error Uncaught Ext.AbstractManager.register(): Registering duplicate id "73" with this manager When I tried to find out the source of error, I found that the code is working fine till the execution of 81 id's ( console.log(_idGen) ). From this, it is clear that the error is related to out of range exception. (9*9 = 81) and also

Uncaught Ext.AbstractManager.register(): Registering duplicate id

爷,独闯天下 提交于 2019-12-01 20:36:52
In the application below, I am trying to add id 's to the generated items dynamically. My code works fine but when I add the below two commented lines in it. It throws error Uncaught Ext.AbstractManager.register(): Registering duplicate id "73" with this manager When I tried to find out the source of error, I found that the code is working fine till the execution of 81 id's ( console.log(_idGen) ). From this, it is clear that the error is related to out of range exception. (9*9 = 81) and also only in Fiddle , when I add HTML text to the child panels, I came to know that they are between 73 to

Best way to access adjacent components / fields

淺唱寂寞╮ 提交于 2019-12-01 18:12:22
I am looking for a way to access components / field that are either in the same items array as the accessing one or even only in a same parent items array (the last one is just a option). In ExtJS3 this was easy by simply defining a ref in the owner container but I didn't found anything like that in ExtJS4. I know that I can use Ext.ComponentQuery() or the shortcuts up() / down() or even Ext.getCmp() but they are all not what I am looking for, cause they just executes a bunch of code while the ref was such an easy Way to do things. Yes, I am aware of the fact that using a ComponentQuery is