extjs4

ExtJS 4.2 - Possible causes of a “Sychronous XMLHttpRequest” warning?

不问归期 提交于 2019-12-18 09:25:37
问题 Good day, sorry for the seemingly broad question title. I am building an ExtJS4 application using php and sql for the user data. Everything was going fine until one day, I notice this error in my java console: Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/. Initially, I wasn't that troubled since my application was loading fairly well while testing it in my local

show different item on selectionchange on a grid

纵饮孤独 提交于 2019-12-18 09:18:09
问题 i have a grid and a form, i need to show different items on the form each time we select a row on that grid i ve been looking on how to do this, and found Ext.getCmp('myform').hide() // or .show() and listeners: { selectionchange: function () {...} now i dont know which row is selected so i can specify which item to show thanks 回答1: Try to following code in your grid. listeners:{ itemclick:function(view, record, item, index, e ) { var v = record.get('firstName'); .... .... } } firstName will

How to remove JSONArray element using Java

。_饼干妹妹 提交于 2019-12-18 05:01:29
问题 My JsonArray is [{ "Id": null, "Name": "One New task", "StartDate": "2010-02-03T05:30:00", "EndDate": "2010-02-04T05:30:00", "Duration": 1, "DurationUnit": "d", "PercentDone": 0, "ManuallyScheduled": false, "Priority": 1, "parentId": 8, "index": 0, "depth": 3, "checked": null },{ "Id": null, "Name": "New task", "StartDate": "2010-02-04T05:30:00", "EndDate": "2010-02-04T05:30:00", "Duration": 0, "DurationUnit": "d", "PercentDone": 0, "ManuallyScheduled": false, "Priority": 1, "parentId": 8,

How do I force the display of a decimal in an ExtJS NumberField to a certain precision?

非 Y 不嫁゛ 提交于 2019-12-17 22:54:16
问题 I have a form with a NumberField that gets values of type float from JSON. If the values happen to be whole numbers, then no decimal places are shown. I would like to show 2 decimal places at all times. Is there a config option for this? Here's my declaration: items: [ { fieldLabel: 'Net Sales', name: 'netSales', allowBlank:false, decimalPrecision:2 }, 回答1: either extend : var myNumberField = Ext.extend(Ext.form.NumberField, { setValue : function(v){ v = typeof v == 'number' ? v : String(v)

EXTJS 4 render HTML of a selected value in a combobox

穿精又带淫゛_ 提交于 2019-12-17 18:43:56
问题 Hello I have the next problem, I want to render the html of my display value in a combobox, at the moment I load a store with the html ready, it renders the html when I show all of them, but when I select one, it show the html. What can I do to render the html when the item is already selected? Here are some images to help to explain the inconvenient: This is when Im going to select one http://i.stack.imgur.com/TcfRA.jpg This is when I select one http://i.stack.imgur.com/Kzi9r.jpg The Html

Extjs 4 combobox default value

我的未来我决定 提交于 2019-12-17 16:27:00
问题 I'm migrating my application from ExtJs 3 to 4 version. I have several comboboxes at my formPanel, and previously I've used hiddenName and all that stuff to submit valueField instead of displayField. All my adaptation works fine (value field IS submitting), but I can't set the default values for comboboxes, they are shown as empty after page load. Previously, I did that just with specifying the 'value' parameter in config. Is there any ideas how to fix that? My code - Model and Store: Ext

up() and down() versus Ext.getCmp()

梦想与她 提交于 2019-12-17 07:25:10
问题 I'm very confused which one I need to use for grep object between up() down() and Ext.getCmp(ID). For me, it is easier that define ID to object and retrieve the object by Ext.getCmp('ID') and the code looks more clean. For example: console.log(this.up('panel').up('panel').down('grid')); console.log(Ext.getCmp('myPanel')); which one is better for performance? 回答1: There are severe gotchas with using IDs and getCmp to find your components. The primary issue is that you can not reuse the

How to display binary data as image - extjs 4

强颜欢笑 提交于 2019-12-17 04:16:21
问题 Here is the binary for a valid .JPEG image. http://pastebin.ca/raw/2314500 I have tried to use Python to save this binary data into an image. How can I convert this data to a viewable .JPEG image with extjs 4? I tried this, but it doesn't work. data:image/jpeg;base64,+ binary data 回答1: Need to convert it in base64. JS have btoa() function for it. For example: var img = document.createElement('img'); img.src = 'data:image/jpeg;base64,' + btoa('your-binary-data'); document.body.appendChild(img)

Ext JS StatusBar with clock

拜拜、爱过 提交于 2019-12-14 03:19:02
问题 I'm trying to create a status bar with clock. I found example in sencha examples, but I'm trying to build it more object oriented way. Ext.define('Urlopy.Components.Statusbar', { extend : 'Ext.ux.statusbar.StatusBar', id : 'basic-statusbar', defaultText : 'Wczytane...', defaultIconCls : 'x-status-valid', iconCls : 'x-status-valid', autoClear : 3000, initComponent : function() { this.currentUserDisplay = Ext.create('Ext.toolbar.TextItem'); this.currentUserDisplay.setText('Not logged in!');

Extjs Treepanel: CSS to change default icons (node and leaf)

我怕爱的太早我们不能终老 提交于 2019-12-14 00:19:53
问题 I have a tree panel like http://jsfiddle.net/bmbMy/ I try to change default icons (node and leaf) by using css. But that not working. .x-grid-row .x-grid-tree-node-expanded { background: url('http://icons.iconarchive.com/icons/sekkyumu/developpers/16/Play-Green-Button-icon.png') no-repeat center center !important; } .x-grid-row .x-grid-tree-node-leaf { background-image:url('http://icons.iconarchive.com/icons/graphicrating/koloria/16/Button-Play-Pause-icon.png'); } How can i do that thanks 回答1