extjs4.1

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!');

extjs4 global network exception listener

泪湿孤枕 提交于 2019-12-14 00:33:09
问题 I want to write a listener that will listen to all network requests errors, something like this : Ext.Ajax.on('requestexception', function(conn, response, options) { if (response.status === 555) { Ext.Msg.alert('test', 'test'); } }); The above code works only for requests via Ext.Ajax.request() , how to rewrite it so it could work also for form submits, url not found error etc. On server side I have Spring MVC that dispatches all requests and if there is any error , the response status of 555

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

Treepanel with rootVisible = true not shown

☆樱花仙子☆ 提交于 2019-12-13 16:03:58
问题 My tree is shown correctly when using rootVisible: false . However setting it to true leads to no tree display and no error. My aim is to show a root node that I can define as / or Root . How to achieve this? My solution: Putting rootVisible to true and adding this to my tree store: root: { id : '/', expanded : false, name : '/', type : 'folder', path : '/', root : true } 回答1: The name for the Rootnode is Root by default. But you can specify any other name. var store = Ext.create('Ext.data

How to set url and root dynamically in extjs

半城伤御伤魂 提交于 2019-12-13 15:21:05
问题 Can anybody tell how to set the url and root of a store dynamically in Ext JS? I have created a store like the one below. I need to update the root and dynamically set the url inside a controller. Ext.define('Test.store.TestStore', { extend: 'Ext.data.Store', model: 'Test.model.TestModel', storeId: 'testStore', proxy: { type: 'jsonp', reader: { type: 'json', root: 'responseXML' } } }); Thanks 回答1: You can set the proxy's url later in your code this way: store.getProxy().url = '/your/url';

Render customize component inside XTemplate

白昼怎懂夜的黑 提交于 2019-12-13 12:23:01
问题 Ext.define('GB.view.DigestList',{ extend: 'Ext.panel.Panel', alias:'widget.digestlist', items:[ { xtype:'dataview', store: 'GB.store.Digests', tpl: new Ext.XTemplate( '<tpl for=".">', '<div class="container">', '{name}', '<div class="davidfun"></div>', '</div>', '</tpl>' ), listeners: { viewready: function(){ var home_d = Ext.create('GB.view.MyOwnDigest'); home_d.render(Ext.query('.davidfun')[0]); // home_d.render(Ext.getBody()); <- it'll work fine with this line }, } }], bind: function

ExtJS 4.2 Month Days (columns) for Holiday Planner

我的未来我决定 提交于 2019-12-13 04:51:44
问题 I have a requirement for a 4.2.1 ExtJS app that Im building, to have a grid like the image below: The objective of the grid is to manage Holidays for employees. I was thinking in setting the columns of the grid dinamically , but will need to fill the background cell depending of the type of "leave type", and also disable some cells depending on the days that are not supposed to work (like weekends, etc). Any advice on how can I approach to the solution? Appreciate in advance. 回答1: There is a

JsonP scriptTag extjs4.1 issue

时光毁灭记忆、已成空白 提交于 2019-12-13 04:03:20
问题 i got the following server response: callback({ "data": [ { "id": "13_gnomodotiseis", "id1": 13, "title": "5/2009 ΓΝΜΔ ΕΙΣΑΠ 2009", "text": "5/2009 ΓΝΜΔ ΕΙΣΑΠ ", "model": "gnomodotiseis", "body": "σίλει...", "type": "text", "history": "old", "url": "", "search_tag": "Γνωμοδοτήσεις", "new_element": "true" } ], "dataset": 1 }) I have a store definition like this: var baseUrl = 'http://localhost:8090/'; Ext.define('Ktimatologio.store.NewSingleBlockStore', { extend: 'Ext.data.Store', alias:

Firing checkchange event on a tree node using its ID in ExtJs 4.1

自古美人都是妖i 提交于 2019-12-13 02:22:31
问题 I have a TreePanel. Each node in tree is given an ID. On click of a button, I want to fire the checkchange event for node 2.1 (as shown in the below tree). How can I fire checkchange event for a node using its ID on click of a button. 1 1.2 1.3 1.4 2 2.1 2.2 3 Thank you 回答1: To fire the checkchange you need to have the node and if it's checked. The TreePanel is using Ext.data.TreeStore to store it's nodes information (it is in the store property). This TreeStore has the getNodeById( id )

How to expand row in a grid using rowexpander plugin Extjs 4.1.1

最后都变了- 提交于 2019-12-13 00:35:06
问题 How to expand row in a grid using rowexpander plugin? I am using the following code in my controller 'editbasicinfotitlegrid gridview' : { afterrender:this.expandAll } expandAll: function(){ var titlesGrid = Ext.getCmp('editBasicInfoTitleGrid'); var expander = titlesGrid.getPlugin('myRowExpander'); console.log(titlesGrid.plugins[0]); expander.toggleRow(0); } But this code gives me the following error Uncaught TypeError: Cannot call method 'down' of null 回答1: So I have found its solution.The