extjs4

Why is the alias of views defined as “widget.myxtype”?

会有一股神秘感。 提交于 2019-12-07 11:19:52
问题 I was wondering: Why is the alias of new widgets we define always defined as "widget.myxtype" - what is the significance of the "widget" in that? 回答1: I think it's a kind of namespace : you can also define aliases for proxies, readers and writers, which respectively need to be prefixed with 'proxy.', 'reader.' and 'writer.' : Ext.define('App.proxy.MyProxy', { extend: 'Ext.data.proxy.Rest', alias: ['proxy.my_proxy'], Ext.define('App.reader.MyReader', { extend: 'Ext.data.reader.Json', alias: [

Ajax.request using ExtJs

假装没事ソ 提交于 2019-12-07 11:10:45
问题 I'm having difficulty loading JSON content from a file. console.log prints "server-side failure with status code 0" , meaning that the request failed. My JSON file URL is correct and the file is present at the given address. Firebug shows the error: "NetworkError: 405 Not Allowed - http://localhost:8080/4910.json?_dc=1336714070619 and the Net tag shows status 405 not allowed . Any ideas on why this is happening? Ext.Ajax.request({ url: 'http://localhost:8080/4910.json', success: function

Remove extjs automatically added classes

痴心易碎 提交于 2019-12-07 06:05:54
问题 I am new to Extjs. I am using Extjs 4 in my project. When the ext-all.js is loaded it automatically adds classes to the <body> tag. and all my other css styles are changed with extjs styles. I found in the documentaion that to set Ext.scopeResetCSS property to true, so I add like below. Ext.onReady(function(){ new Ext.Component({ scopeResetCSS: true }); }); but it doesn't change any thing. I still have the same problem. Is there any way to stop extjs from automatically adding css classes to

How to stop extjs treepanel from loading infinitely?

一笑奈何 提交于 2019-12-07 05:32:26
Finally after struggling with extjs tree panel, tree store and building custom reader to read and convert pentaho data for 2 weeks I have managed to load pentaho data into treepanel of extjs. Now my Tree panel is loading same data infinitely. Treepanel looks as follows : Part of my json data looks as follows : { {name: 'US', candidateCount: 3, children: []}, {name: 'India', candidateCount: 922, children: [ {name: 'Goa', candidateCount:124, children: []}, {name: 'Maharashtra', candidateCount: 43, children: [ {name: 'Pune', candidateCount: 3}, {name: 'Mumbai', candidateCount: 33}, {name:

Read ExtJS message from ajax store

偶尔善良 提交于 2019-12-07 04:59:18
问题 I have an ExtJS store with an ajax proxy and json reader: Ext.create('Ext.data.Store', { proxy: { type: 'ajax', url: '...', reader: { type: 'json', root: 'data', totalProperty: 'totalCount', messageProperty: 'message', successProperty: 'success' }, ... This is what I get from the server: data: [...] message: "I want to read this string after the store is loaded" success: true totalCount: x Now I want to access the 'message' when the store is loaded - where do I get it? I looked a lot but I

extjs 4 tree select a specific node by its internal id (not by record index)

假如想象 提交于 2019-12-07 04:57:24
问题 I'm trying to sync a dataview (explorer window) with a tree (directory tree). When I click on an element on my dataview, I'd like the same node gets selected on the tree The problem is that using the tree.getSelectionModel().select(index) doesn't allow me to select the node by its internal id (the id I provided in my treestore), but only by the record index... So I just can't sync both views... There would be the solution of the expandPath(), but my treestore is fed by a relational database

How to hide tab in ExtJS 4

此生再无相见时 提交于 2019-12-07 03:38:41
问题 How to hide tab in ExtJS 4? Ext.getCmp("mytab").hide() doesn't work Can any one help me? 回答1: Read the documentation here: http://docs.sencha.com/ext-js/4-0/#!/api/Ext.tab.Panel They give a specific example of how to hide tabs Extracted from link: var tabs = Ext.create('Ext.tab.Panel', { width: 400, height: 400, renderTo: document.body, items: [{ title: 'Home', html: 'Home', itemId: 'home' }, { title: 'Users', html: 'Users', itemId: 'users', hidden: true }, { title: 'Tickets', html: 'Tickets'

How to set a panel/ window transparent in extjs 4?

£可爱£侵袭症+ 提交于 2019-12-07 03:04:12
问题 How to set a panel or a window transparent (half)? Via CSS or set the html code? The extjs version is 4.0.7. Thanks. 回答1: You can accomplish this with CSS. Add this config to your panel: bodyStyle: 'background:transparent;' or bodyStyle: 'opacity:0.5;' 来源: https://stackoverflow.com/questions/14049013/how-to-set-a-panel-window-transparent-in-extjs-4

extJs 4 grid customization - Total row at the end

天大地大妈咪最大 提交于 2019-12-07 02:58:05
问题 I want a grid with only two columns, one is for name and the other for percentage. The very last row will have 'Total' as the name and the total percent as 'percentage'. This row only will be styled differently than the other rows. Please guide me how can i accomplish this. Thanks.. 回答1: There is a grid feature to accomplish exactly that. It is covered here in the docs with some examples of how to use it. You can also customize the style by providing your own implementation of the x-grid-row

ExtJS: Simple Form ignores formBind

99封情书 提交于 2019-12-07 02:54:29
问题 I have a tiny problem that is driving me crazy for days. I have a form panel: Ext.define('EC.view.PasswordPanel', { extend: 'Ext.form.Panel', alias: 'widget.pwdpanel', bodyPadding: 15, initComponent: function() { this.initialConfig = {url:'/password/'}; this.fieldDefaults = { labelAlign: 'right', labelWidth: 135, msgTarget: 'side', allowBlank: false, inputType: 'password' }; //this.listeners = { //// circumvent broken formBind //validitychange: function(comp, valid) { //this.down('button')