extjs

Use and function of the new Ext.app.EventDomain

左心房为你撑大大i 提交于 2019-12-22 09:46:34
问题 We have a huge amount of applications which all are sharing some parts (data/backend/frontend). Users may have access to one or more applications and currently the user need to load them one by one. Our Customer don't like this so we are now refactoring all into one huge application where the client itself resolves which module to load. First test looked good and due to our custom modulebuilder tool the loading times are at a min. Now I stumbled over the new Ext.app.EventDomain and wondered

ExtJS 4.1 : How to combine local data with ajax loaded data in a single store?

ぃ、小莉子 提交于 2019-12-22 09:45:34
问题 I'm looking for a way to combine local data with ajax loaded data in a single store. It's difficult for me to explain this in english, I hope this piece of code will be more explicit : var store = Ext.create('Ext.data.Store', { autoLoad: true, fields: ['id', 'name'], proxy: { type: 'ajax', api: { read: '/read' } }, data: [{ id: 1, name: 'John' }] }); Json returned by "/read" : [{ id: 2, name: 'Jack' }] . Desired behaviour : store.count() // 2 回答1: You can use .load({addRecords: true} to add

How do I set a Ext Grid Filter Default?

自闭症网瘾萝莉.ら 提交于 2019-12-22 08:54:16
问题 I have a working sort-able grid using the ext 3.4 grid filter plugin. I would like to default the active column to filter true values. User who needs the inactive records could remove the filter. How do I specify a default filter column and value? Thanks in advance! colModel: new Ext.grid.ColumnModel({ defaults: { sortable: true // How do I specify a default filter value // // Only show active records unless the user changes the filter... }, columns: [{ dataIndex:'f_uid', id:'f_uid', header:

How login to spring security using Ext.Ajax?

蓝咒 提交于 2019-12-22 08:48:37
问题 I'm developing an application using Extjs-6 with Spring 4. My Application is Restful. I enable CORS Origin as follow: public class CorsFilter extends OncePerRequestFilter { private static final String ORIGIN = "Origin"; @Override protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException { response.addHeader("Access-Control-Allow-Origin", "*"); response.setHeader("Access-Control-Allow-Credentials",

ExtJS 5 application + Django rest framework CORS error when changing URL of store

心已入冬 提交于 2019-12-22 08:44:42
问题 I am developing a ExtJS application that uses a Django-rest-framework service. I am using CORS headers to allow fetching the data from the service (https://github.com/OttoYiu/django-cors-headers). What happens is that at a point in time I want to change the URL from the store. And when I do that I get the following error: XMLHttpRequest cannot load http://10.98.0.241:8000/reacsearch/as?_dc=1418831884352&page=1&start=0&limit=25. The request was redirected to 'http://10.98.0.241:8000/reacsearch

click listener for tab panel in EXTJS

这一生的挚爱 提交于 2019-12-22 08:14:32
问题 i use a tab panel in extjs. I want to display an alert when clicked on a tab. But i am not sure how. This is what i do now: { xtype: 'tabpanel', activeTab: 0, region: 'center', items: [ { xtype: 'panel', title: 'All', items: [grid] }, { xtype: 'panel', title: 'Closed' }, { xtype: 'panel', title: 'Open' } ], listeners: { click: function () { alert('test'); } } } How can is display All, Closed or Open when there is clicked on that tab? 回答1: There is no event for tab click in TabPanel , however

Sencha touch 2.4.0 SASS compile error

人盡茶涼 提交于 2019-12-22 08:09:19
问题 Environment: Mac OSX Mavericks 10.9.4 Compass 1.0.1 (Polaris) Compass-blueprint (1.0.0) Sass 3.4.5 (Selective Steve) sencha app build testing command no error When I compile app.scss file in the ./resources/sass/ directory, an error happened. compass compile app.scss error app.scss (Line 209 of /Users/icese7en/Sites/Demos/Sencha/Practice/WeatherApp/touch/resources/themes/stylesheets/sencha-touch/base/src/_Class.scss: File not found or cannot be read: /Users/icese7en/Sites/Demos/Sencha

How can I put a dropdown in the header of an ExtJS panel?

谁都会走 提交于 2019-12-22 07:25:11
问题 I can put HTML elements such as text and images in a panel header like this: var grid = new Ext.grid.GridPanel({ region: 'center', style: 'margin: 10px', store: new Ext.data.Store({ data: myData, reader: myReader }), headerCfg: { tag: 'div', cls: 'x-panel-header', children: [ { tag: 'div', cls: 'panel_header_main', 'html': 'Shopping Cart' }, { tag: 'div', cls: 'panel_header_icon1', 'html': '<img src="images/icon_plus.png" />' }, { tag: 'div', cls: 'panel_header_icon2', 'html': '<img src=

In ExtJS, How Can You Loop Through Menu Items?

我的梦境 提交于 2019-12-22 06:49:25
问题 How can you loop through all the items in an ExtJS toolbar menu, for example to change their icons? 回答1: Use the 'each' method of the MixedCollection instance in the button's menu. Assuming a definition like: var pnl = new Ext.Panel({ tbar: [ { itemId: 'a_btn', text: 'A menu button', menu: {items: [ { text: 'Item 1' }, { text: 'Item 2' } ]} } ] }); You can then later do: var btn = pnl.getTopToolbar().get('a_btn'); btn.menu.items.each(function( item ) { item.setIconClass(''); }); 来源: https:/

How can I access class variables in an ExtJS event handler?

こ雲淡風輕ζ 提交于 2019-12-22 06:49:11
问题 this.getUrl = 'test'; this.items.add( new Ext.form.Checkbox( { listeners: { check: function(checkbox, checked) { alert(this.getUrl); }, } ) ) How do I access this.getUrl in the check handler? 回答1: There are multiple ways to access the property getUrl . Here are the few possible options: 1. Use Ext.getCmp : If you set an id for your FormPanel (or other extjs component whatever you are using), you can access it using Ext.getCmp() method. So, var yourComponent = Ext.getCmp('yourComponentId');