extjs4

Button text color in Extjs 4

我的梦境 提交于 2021-02-07 07:15:51
问题 I'm using Exjts 4 and i want to change the button text color. Here is my code: { xtype: 'button', text: 'My Button', style:{ color: 'red' } } 回答1: There is some strange behavior in Extjs 4.2.0, but there is an override possible. Give your button a class using cls:'yourClassName' property and then in CSS make a full path to span holding the text, like so: .yourClassName div a span . Also give your css property a !important value to successfuly override base class. Ext.create('Ext.Button', {

Javascript how to show each element of array on a new line

做~自己de王妃 提交于 2020-08-21 05:17:10
问题 I have a string build form comma separated values I use split to get each value and after that I want to show each value on a new line but what really happens is that I get each value on a new line except of the last two which are shown together on a same line. Just to make it clear: value1 ,value2 ,value3 ,value4,value5 Here is the function which I'm using: _checkDates: function(dates) { if (dates != null) { var zzz = dates.split(','); var xxx = zzz.length; console.log(xxx); for (var i=0; i<

Javascript how to show each element of array on a new line

纵饮孤独 提交于 2020-08-21 05:17:05
问题 I have a string build form comma separated values I use split to get each value and after that I want to show each value on a new line but what really happens is that I get each value on a new line except of the last two which are shown together on a same line. Just to make it clear: value1 ,value2 ,value3 ,value4,value5 Here is the function which I'm using: _checkDates: function(dates) { if (dates != null) { var zzz = dates.split(','); var xxx = zzz.length; console.log(xxx); for (var i=0; i<

Are Stores created in the initComponent function memory leaks once the component is destroyed or will these stores be garbage collected?

自古美人都是妖i 提交于 2020-05-15 08:08:49
问题 This is a question that surged from this other one: Best practice to have the same view and store multiple times in ExtJS 4 So in a scenario where stores are created in the initComponent function of a grid. Should I override onDestroy of the grid to also destroy the store ? Or these stores would be garbage collected because simply there are no references to them? 回答1: No, the store will still exist after destroying the Grid No, you will not need to override the destroy method of the grid You

Is there Global variables in EXT JS

给你一囗甜甜゛ 提交于 2020-02-03 04:22:27
问题 In java and C++ we could store a variable globally and access its value from any where in the project. Say, i am inside a class called Residence and i am saving the residenceNumber which is a INT to a global variable called houseNumberGlobalVariable . Now, i could access houseNumberGlobalVariable from any class in the project. In a similar fashion, is there a Global variable in EXTJS that i could use. I need to set a value from one class and access it from another. What is the equivalent in

Calling the items.add method twice causes the two items to overlap on the card

China☆狼群 提交于 2020-01-25 11:28:07
问题 Here is my add item code: myapp.cards.vehicleInfo.items.add( new Ext.List({ ...}) ) If after this I then do: myapp.cards.vehicleInfo.items.add( new Ext.Panel( {html: 'test' } ) ); The panel with 'test' appears on top of my list (overlapping), rather than vertically below it. I have tried doing a componenet dolayout inbetween adding the two items. Any ideas? If I only do one or the other of the above it works as expected but if I do both together it leads to the above behaviour. Thanks 回答1:

Not able to update parent for all PortfolioItem/Feature which I copied for particular PortfolioItem/MMF

六月ゝ 毕业季﹏ 提交于 2020-01-25 11:05:10
问题 I am trying to set parent for features which I copied for particular MMF, but parent is getting set for only last feature. Below line of code to set the parent Record is new feature object _newParent is the MMF object, where I am doing wrong record.set("Parent", _newParent.get("_ref")), Need help please.Any suggestions? Whole is method is this _genericInnerCopy: function(_childObj) { that = this; model = that.model; var record = Ext.create(model, { Name: _childObj.get('Name'), //Parent:

extjs 4 grid fireevent itemclick

微笑、不失礼 提交于 2020-01-24 08:42:12
问题 How do you make a fireEvent itemclick after the store loads. I have this but it doesn't work: pcfstore.on('load', function(){ //auto select first row; Ext.getCmp('pcf_grid').getSelectionModel().select(0); // this works //fire itemclick event var grid= Ext.getCmp('pcf_grid'); grid.fireEvent('itemclick', grid, 0); //this doesnt work }); Here is my itemclick event in grid view: viewConfig: { listeners: { itemclick: function(dv, record, item, index, e) { alert(record.data.code); } } } Basically

Can I Turn Off Hardware Accelerated Canvas From Javascript?

。_饼干妹妹 提交于 2020-01-24 04:15:15
问题 Chrome 18 seems to have a pretty big problem with Ext 4 charts. Is there any way I can disable the hardware accelerated canvas? (I'm pretty sure that's what the bug is from) or will I have to wait for someone to release a patch? 回答1: Command line switch: --disable-accelerated-2d-canvas Added that at the end of my Chrome shortcut target and checked chrome://gpu/ Canvas: Software only. Hardware acceleration disabled. 回答2: This temporary fix may be helpful: http://www.sencha.com/forum/showthread