extjs

ExtJS - How to get DOM ID of a component?

倾然丶 夕夏残阳落幕 提交于 2020-01-05 08:26:09
问题 Say the component doesnt have an ID given to it. So how would you first, get a handle on the component, and then get the DOM Id of that component? thanks in advance! -Jack 回答1: Use the javascript console. You can also install FireBug. In your javascript code put: console.log(myComponentWhosIdIWantToGet); Explore you object's properties. 回答2: I believe this is what you need: http://docs.sencha.com/extjs/4.2.2/#!/api/Ext.Component-method-getEl Example: //get Dom Element var DomEl = Ext.getCmp(

How to check the style properties in extjs

戏子无情 提交于 2020-01-05 07:40:49
问题 How to check the style properties in extjs? To set a style to a panel, we can use setBodyStyle . After setting the style, I want to check the value of a particular property. Like, var panel = Ext.getCmp('id'); if(panel.getStyles().fontSize == 24) //for example //do this stuff else //do the other stuff I am using extjs 4.1.1a 回答1: These methods are only available on Ext.dom.Element level. Meaning you will need to call var panel = Ext.getCmp('id'); if(panel.el.isStyle('fontSize', 24)) //for

Using ExtJS 4 charts in ExtJS 3 application

北慕城南 提交于 2020-01-05 07:19:07
问题 I'm trying to add Ext4 charting to an existing Ext3 application, using ext-all-sandbox.js. I've got the basics working, but the code below gives axis.processView is not a function . It works fine without the axes defined (but with no axes obviously). It appears that the config objects are being used directly instead of being used to create actual axis instances. Any solutions to get this working? TestGraphPanel = Ext.extend(Ext.Panel, { initComponent: function() { TestGraphPanel.superclass

Store.sync() with new record does not import server-generated fields in response

≯℡__Kan透↙ 提交于 2020-01-05 03:31:45
问题 I have a grid with row-editing enabled. When I add a row and call store.sync(), the server generates certain fields on that record, and returns the full record info in the response. However, ExtJS does not seem to update its copy of the record, except for the id. Is there a way to make it do that, or do I need to write custom code? This is an excerpt of the grid's controller: doneEdit: function (editor, e, eOpts) { var me = this; // // Set up loading mask on grid during update (if record

Store.sync() with new record does not import server-generated fields in response

这一生的挚爱 提交于 2020-01-05 03:31:31
问题 I have a grid with row-editing enabled. When I add a row and call store.sync(), the server generates certain fields on that record, and returns the full record info in the response. However, ExtJS does not seem to update its copy of the record, except for the id. Is there a way to make it do that, or do I need to write custom code? This is an excerpt of the grid's controller: doneEdit: function (editor, e, eOpts) { var me = this; // // Set up loading mask on grid during update (if record

Jquery library not working with sencha touch?

烈酒焚心 提交于 2020-01-04 18:18:50
问题 I am currently building an mobile application that is based on Sencha Touch 2. At the moment im just trying out some experiments to see what Sencha is capable too. And today I got stuck on a thing that really seems strange - I just wanted to try if I could use the jQuery library for my application and use it's additions. Strangest thing is I can't get any response from when I am making a jquery function. I've included the jquery library and my script in the index.html file in my sencha

How do I alter metaData on number, date and boolean columns in ExtJS 6.x using Sencha Architect?

吃可爱长大的小学妹 提交于 2020-01-04 15:57:49
问题 Per Sencha documentation, numbercolumn, datecolumn and booleancolumn does not have a renderer event. As logical as this sounds there is an inherent issue with not having a renderer event on these column types. Example of a renderer function in a view controller to modify the background color when the LineNum of the record is in the array of warning line numbers. renderCompanyID: function(value, metaData, record, rowIndex, colIndex, store, view) { if (record.get('LineNum') > 0) { this

How to get the value of checkbox

别等时光非礼了梦想. 提交于 2020-01-04 15:31:22
问题 How to get the value of a check box? var tb = new Ext.Toolbar(); tb.add({ xtype: 'checkbox', boxLabel: 'Expand Groups by Default', id: 'GetChkBoxValue', checked: true, handler: function() { alert(this.getValue()) } }); Is it possible to get the value of the checkbox outside tb.I have done something like this but it is not firing Ext.getCmp('GetChkBoxValue').getValue(); 回答1: Try out the following code, it should work: new Ext.Window({ renderTo: Ext.getBody(), width: 500, height: 200, title:

Programmatically call handler of a button event?

一曲冷凌霜 提交于 2020-01-04 15:29:41
问题 How can I call a handler from an button event? I want to click event a button and call that button handler? Ext.getCmp('buttonID').click(); /// How to fire handler of that button? 回答1: You may get this way: var button = Ext.getCmp('buttonID'); button.fireEvent('click', button); The second param must be button if you want to keep hanlder logic equals to common button's clicking 回答2: Ext itself does it this way: var btn = Ext.getCmp('buttonID'); var e = null; // we don't have any event, so let

( libraries issue )

亡梦爱人 提交于 2020-01-04 09:23:13
问题 I am using Sencha Architect with Extjs 4 and by following the basic example here : http://geoext.org/tutorials/quickstart.html#basic-example i have to switch included libraries from Ext 3 to Ext 4, so i typed : <script src="extjs-4/ext-all.js" type="text/javascript"></script> <script src="extjs-4/ext.js" type="text/javascript"></script> <link rel="stylesheet" type="text/css" href="extjs-4/resources/css/ext-all.css"></link> <script src="GeoExt/lib/GeoExt.js" type="text/javascript"></script>