extjs4

Ajax.request using ExtJs

牧云@^-^@ 提交于 2019-12-05 16:11:39
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(response, opts) { var obj = Ext.decode(response.responseText); console.log(obj[0].name); }, failure:

ExtJS 4.0.7 Load complete TreePanel

為{幸葍}努か 提交于 2019-12-05 15:18:10
I am in trouble with the ExtJS 4.0.7 TreePanel. I would like to load the complete tree from on JSON request. The request returns the following: { "data": { "children": [ { "text": "OS", "leaf": false, "children": [ { "text": "Hostname", "leaf": false, "children": [ { "text": "hostname.int.com", "leaf": true, "children": [] } ] } ] } ] } } With it doesn't work with the following store configuration (or any other i've tried) Ext.define('My.store.SysInfo', { extend: 'Ext.data.TreeStore', model: 'My.model.SysInfo', proxy : { type : 'ajax', url : '/sysinfo/getSysInfo.php', reader : { root : 'data'

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

旧时模样 提交于 2019-12-05 13:48: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? 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: ['reader.my_reader'], Ext.define('App.reader.MyWriter', { extend: 'Ext.data.writer.Json', alias: ['writer.my

Render Ext.application in a div

爷,独闯天下 提交于 2019-12-05 10:59:40
问题 I am trying to run an ExtJS4 Ext.application inside our existing website template. We have a div #content , into which I want to place the application for development. How do I render the application into this area, rather than replacing the existing html page? Ext.application({ name: 'HelloExt', launch: function() { Ext.create('Ext.container.Viewport', { layout: 'fit', // renderTo: Ext.Element.get('#content') doesn't work items: [ { title: 'Hello Ext', html : 'Hello! Welcome to Ext JS.' } ]

ExtJS ComboBox dropdown width wider than input box width?

蹲街弑〆低调 提交于 2019-12-05 09:55:16
问题 Is there any way to set the width of an ExtJS (version 4) ComboBox's dropdown menu to be wider than that of the actual input box? I have a comboxbox that i want to be around 200px but I have paging on the results dropdown and that width is not even big enough to show all the paging bar's controls. Here's my code to create the combo: var add_combo = Ext.create('Ext.form.field.ComboBox', { id : 'gbl_add_combo', store : Ext.create('Ext.data.Store', { remoteFilter : true, fields : ['gb_id',

Remove extjs automatically added classes

徘徊边缘 提交于 2019-12-05 08:42:01
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 the tags? Please help.. This is my code to generate a multi line message box. <link rel="stylesheet"

Highlight a part of an extjs4 line chart

陌路散爱 提交于 2019-12-05 08:36:50
In the extjs 4.1.1a code below is a working example of a line chart. Now I need to highlight a part of that chart on a given min and max timestamp. {'xtype' : 'chart', 'store' : 'ChartData', 'height' : '100%', 'width' : '100%', 'legend' : {'position' : top}, 'axes': [{ 'title': 'Power', 'type': 'Numeric', 'position': 'left', 'fields': ['power'] },{ 'title': 'Timestamp', 'type': 'Numeric', 'position': 'bottom', 'fields': ['timestamp'], 'minorTickSteps': 3 }], 'series': [{ 'type': 'line', 'fill': true, 'axis' : 'left', 'xField': 'timestamp', 'yField': 'power' }]} I've searched the sencha forum

extJs 4 grid customization - Total row at the end

纵饮孤独 提交于 2019-12-05 08:05:36
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.. 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-summary class in your css. EDIT Here's some examples of setting the summary row style, as you can see there

How can I check if Shift+Enter is pressed on a textarea

南楼画角 提交于 2019-12-05 06:53:58
问题 I want to submit the form if Enter is pressed and stop the event if Shift + Enter is pressed. The callback for this has Ext.EventObject parameter which does not provide any way to check if shiftkey is pressed. it has two methods .hasModifier and .isSpecialKey . Both returns boolean . There is no way to find if shiftkey is pressed. how do I trace it? This is my textarea component: { region : 'center', margins : '5 0 0 0', xtype : 'textarea', name : 'chatmessage', enableKeyEvents: true,

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

烂漫一生 提交于 2019-12-05 06:35:15
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. 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