extjs3

How do I programmatically hide Tab in the TabPanel (ExtJS 3)

只谈情不闲聊 提交于 2019-12-07 09:28:06
问题 This my TabPanel code: inside the code there is two tabs (tab1 and tab2) in the TabPanel (tabs_panel) MyTabPanelUi = Ext.extend(Ext.TabPanel, { activeTab: 0, height: 210, resizeTabs: true, tabWidth: 266, id: 'tabs_panel', initComponent: function () { this.items = [{ xtype: 'panel', title: 'Project', padding: 20, height: 150, id: 'tab1' }, { xtype: 'panel', title: 'Service', height: 150, padding: 20, id: 'tab2' }] } }); I'm trying to hide tab2 using bellow code but this bellow code var

After loading store, select and show specific row in grid works in Chrome, not in IE

血红的双手。 提交于 2019-12-06 15:13:43
I suppose I must be doing something wrong here. I have a GridPanel which gets its data from a Store. The store has a listener on the load event, which selects row 8 of the grid's selection model and tries to bring it into focus. In Chrome (currently version 33) this works and the specified record is visible. In IE (version 11) this does not work. At the time of the alert('pause'); statement, the grid is visible with the specified row visible. But after clicking away the alert message, the grid seems to be doing something, cause after that it just show the first few rows. Ext.onReady(function()

Abort an ext js grid store ajax call

天涯浪子 提交于 2019-12-06 12:39:00
问题 I need to abort a EXT JS store load (which is a grid panel store using an ajax call). I am using Ext JS 3.4 I have tried the following. Ext.Ajax.abort(store.proxy.activeRequest); delete store.proxy.activeRequest; 回答1: This can be solved by giving a condition, var activeRequest = store.proxy.activeRequest; if (typeof activeRequest.read != 'undefined') { Ext.Ajax.abort(activeRequest.read); } 来源: https://stackoverflow.com/questions/36590865/abort-an-ext-js-grid-store-ajax-call

ExtJS 'datefield' validation override

我只是一个虾纸丫 提交于 2019-12-06 01:32:00
I needed a datecolumn with some custom behaviour, specifically I needed to be able to enter in a date or and age in the same field (with an age staying rendered as an age and a date staying rendered as a date) Eg. Entering "23" will leave "23" in the field as a valid value, or entering "22/1/88" will leave "22/1/88" as valid value. So I tried having a datecolumn with the editor defined like this (note the validate override): editor: { xtype: 'datefield', format: 'd/m/Y', validate: function(){ if(!this.value.match(SOME_REGEX){ if(!this.value.match(SOME_REGEX){ return false; } } return true; } }

Ext JS - How to Scroll to bottom of Textarea

ぃ、小莉子 提交于 2019-12-05 18:23:10
This is my code below. How can I scroll to bottom of textarea? It must be something like Ext.getCmp('output').setScrollPosition(Ext.getCmp('output').getScrollHeight()); Here is my code for the textarea: var myWin= new Ext.Window({ height : 340, title : 'CHAT', modal : true, resizable : false, draggable : false, closable : false, width : 477, layout : 'absolute', bodyStyle : 'padding : 10px', buttonAlign : 'center', items : [ { id : 'output', xtype : 'textarea', width : 216, readOnly : true, autoScroll : true, height : 234, x : 10, y : 10 }, item6, { id : 'input', xtype : 'textfield', width :

ExtJs Message box with Custom buttons

放肆的年华 提交于 2019-12-04 17:04:09
问题 How to display ExtJS Message box with Custom buttons. I want a Message box with a Custom message and "Cancel" and "Deactivate" Buttons. Please give some idea. buttons: [{ text: "Cancel", handler: function () { Ext.MessageBox.hide(); //submitTicketForm(); } },{ text: "Deactivate", handler: function () { Ext.MessageBox.hide(); } }], I am using it like this but not getting any buttons. 回答1: MessageBox is an single instance of an internally managed Window used for prompt, show, alert, etc. You

Display multiple fields in ExtJs 3.3 Combo box

纵然是瞬间 提交于 2019-12-04 05:28:26
I've opened up an ExtJs project that I've not had my head in for some time, and this is baffling me. I've an Ext.form.ComboBox that uses a remote JSON store to list users. I use an XTemplate to format the users as listed in the drop down: '<tpl for="."><div class="x-combo-list-item">', '{firstname} {lastname} ({email})', '</div></tpl>' When I expand the drop down, I see my users listed correctly: John Smith (jsmith@company.com) John Ford (jford@company.com) However when I click on a user, the combo box contents change to the valueField property ('firstname') which you would expect. Issues:

ExtJS 3: Two ways of creating custom class: what's the difference?

老子叫甜甜 提交于 2019-12-04 00:59:54
I'm trying to learn ExtJS and object-oriented JavaScript in general. I've seen people defining classes in custom namespaces in a couple of ways. What's the difference between these two methods? Method 1 Ext.ns('myapp.cars'); (function(){ var Car = Ext.extend(Object, { //... }) myapp.cars.Car = Car; })() Method 2 Ext.ns('myapp.cars'); myapp.cars.Car = Ext.extend(Object, { //... }); Method 2 is easier to read and requires less code; is there any reason Method 1 is better? Thanks! It's basically the same, except that you could use private variables in the self-exectuing function of the first

ExtJs Message box with Custom buttons

瘦欲@ 提交于 2019-12-03 05:52:34
How to display ExtJS Message box with Custom buttons. I want a Message box with a Custom message and "Cancel" and "Deactivate" Buttons. Please give some idea. buttons: [{ text: "Cancel", handler: function () { Ext.MessageBox.hide(); //submitTicketForm(); } },{ text: "Deactivate", handler: function () { Ext.MessageBox.hide(); } }], I am using it like this but not getting any buttons. MessageBox is an single instance of an internally managed Window used for prompt, show, alert, etc. You can change the buttonText by passing in a string for show like this: buttons: {ok: "Foo", cancel: "Bar"} Refer

Property Grid in ExtJs

若如初见. 提交于 2019-12-02 20:42:07
问题 I have some store, which is formed data. On panel it looks how "fieldName" and text field (in depension from invoked form). For example, on one form is displayed "name document" and field, on another: date of selling and date field. Data is formed dynamicly Here is store: tableTempStore = new Ext.data.JsonStore({ url: objectUrlAddress, baseParams: { 'objectID': objectID }, root: 'Fields', fields: [{ name: 'Type', type: 'int' }, { name: 'Value' }, { name: 'IsRequired', type: 'bool' }, { name: