extjs3

Trigger synthetic ExtJS event from jQuery or vanilla javascript event

无人久伴 提交于 2019-12-13 05:18:58
问题 There exists a website implemented with ExtJS 3.1. I want to pre-fill some fields automatically. The problem is, that some fields are not validated by ExtJS when automatically filling them. I can trigger the validation by firing ExtJS's blur event: field.fireEvent('blur', field); However, I don't want to do this. I want that validation to be triggered by a normal event triggered via jQuery: $field.blur(); What I am asking here is the following: How to trigger the blur event of a textbox in

ExtJS Ajax Request Timeout Has No Affect with Internet Explorer

若如初见. 提交于 2019-12-12 17:23:03
问题 I am using ExtJS 3.4. I have a long running asynchronous process that I need to wait until it is finished. It works fine for Firefox but Internet Explorer will not wait. How do I solve this problem? Here is what I have for the client side code: function SaveUser(form, myDataObject, url) { if (form.isValid()) { StatusMessage.show('Please wait. New User Registrations may take up to one minute to complete.'); Ext.Ajax.request( { url: url, method: 'POST', timeout: 30000, params: myDataObject,

autoHeight issue in ExtJS4

こ雲淡風輕ζ 提交于 2019-12-12 12:20:31
问题 We are using autoHeight to window in ExtJS3. But now in ExtJS4 it is not working. Is there any alternative to this one? If yes,please let me know. 回答1: Read this and this, maybe it helps 回答2: dont set the height property then it should automatically get height depending on content it works for me,hope it will for u 来源: https://stackoverflow.com/questions/6758298/autoheight-issue-in-extjs4

Form field for IP address v4 with Extjs

坚强是说给别人听的谎言 提交于 2019-12-12 10:24:02
问题 I create a form panel with Extjs 3 and i wanna create a field to put an IP address v4 like I have 4 squares to put 4 numbers. Thanks for your help 回答1: I have used Robert B. Williams version for IP field. You can change it to fit V4 IPs with just a few twinks. here is the code: /** * @class Ext.ux.form.TimeField * @extends Ext.ux.form.FieldPanel * This class creates a time field using spinners. * @license: BSD * @author: Robert B. Williams (extjs id: vtswingkid) * @constructor * Creates a new

How to create shortcut keys in extjs

 ̄綄美尐妖づ 提交于 2019-12-12 04:53:40
问题 I write this code for submit on Enter { fieldLabel : 'Password', name : 'j_password', inputType : 'password', allowBlank : false, listeners : { 'render' : function(cmp) { cmp.getEl().on('keypress', function(e) { if (e.getKey() == e.ENTER) { submitform(); } }); } } } What change do I need to do for shortcut keys Like Save(Ctrl + S) , Paste(Ctrl +P) , Open (Ctrl + O) , Exit(Ctrl +X) ? 回答1: You need to write appropriate handler to do the job using KeyMap. Ext 4 code snippet may be as follows -

How to modify fields before rendering it to the grid in Extjs

隐身守侯 提交于 2019-12-12 04:07:26
问题 I have to append a value to the data fetched from the store before rendering it to the grid in ExtJs. Please guide me on achieving the above mentioned functionality. Currently the grid is populated in the following manner: Ext.define("MyApp.view.ShowDetails",{ extend: 'Ext.grid.Panel', requires:['MyApp.store.MyStore'], store:'MyStore', stateId: 'stateGrid', selType : 'checkboxmodel', selModel : { mode : 'MULTI' }, plugins : [Ext.create('Ext.grid.plugin.RowEditing', { clicksToEdit : 2 })],

Thousands separators in Ext.form.NumberField

ぐ巨炮叔叔 提交于 2019-12-11 10:24:55
问题 I want to override some config options of Ext.form.NumberField, but I don't find something like a "thousands separator". Is there a way to define this for NumberFields in Ext? Or have I had to write my own function to provide this functionality? 回答1: On closer inspection according to the forums/devs, NumberField doesn't support formatting. Numbercolumn on a grid does. Their suggestion is to use a TextField and either format the value serverside before displaying it, or to apply a function on

How to use addCls() in extjs 3.2

北慕城南 提交于 2019-12-11 05:18:50
问题 I am try to delete row from a grid. For that I need to strike a row. I am using addCls but it is not supporting in extjs 3. What is the alternate way to do that. { xtype: 'button', text: 'Delete', handler : function(){ var cogrid = Ext.getCmp('HART_GRID'); var costore = cohartgrid.getStore(); var record = Ext.getCmp('HART_GRID').getSelectionModel().getSelected(); if (record) { Ext.fly(row).addCls('row-deleted');// This line is throwing error. } if(record.data.Excl == "No"){ cohartstore.remove

Ext JS 3: How to copy a dynamically-generated treepanel?

时光总嘲笑我的痴心妄想 提交于 2019-12-11 04:40:04
问题 I have a dynamically-generated Ext.tree.TreePanel in Ext 3.3.1. It looks like this: -root -fruit -apple -vegetable -carrot I need to make a duplicate/copy of this tree . I understand that the ids will be different and that's fine, but I want the text and the structure to be the same. My current idea is to recursively go through and node-by-node create a new tree. Is there a faster way? NOTE: Someone very helpfully suggested cloneConfig(), but my understanding is that it will not capture a

How to implement CSRFGuard in ExtJs AjaxRequest?

流过昼夜 提交于 2019-12-11 03:36:09
问题 I'm using ExtJs for UI and am doubtful of using CSRFGuard in AjaxRequest of extjs. I'm currently appending the CSRFName and value to the URL of ajax and it is working perfectly fine. Is there any way that the token name and value could be added as header of Ajax so that it need not be written for each and every AjaxRequest. Seeking early response. Thanks 回答1: You could put it in http://docs.sencha.com/ext-js/4-1/#!/api/Ext.Ajax-event-beforerequest and that would apply to every AJAX request