extjs

Open or save the excel file attachment from the browser using ajax request in Ext.js

六眼飞鱼酱① 提交于 2019-12-12 02:48:59
问题 I am generating the excel file in server side and writing it to the outpuststream with the following response headers. response.setContentType("application/vnd.ms-excel"); response.setHeader("Content-Disposition","attachment;filename="+fileName); In my client side : An ajax call to the servlet as shown : Ext.Ajax.request({ url: 'GenerateReport', method: 'GET', params: { 'start_date': sd.getValue(), 'end_date':ed.getValue() } }); Browser shows following Response Headers : My Issue : The Open

Passing arguments to Listener

不打扰是莪最后的温柔 提交于 2019-12-12 02:48:41
问题 I have a button: var me = this; ... var argumentToPass; ... { xtype: 'button', text: 'text', listeners: { click: { fn: me.onBtnAddToBidClick, scope: me } } } ... me has a refferance to the argumentToPass. And the Listerner: onBtnAddToBidClick: function(button, e, options){ alert(argumentToPass) } Basicly i am trying to make a simple function(String var) method. How can i get the scope from inside the Listener(onBtnAddToBidClick) EDIT: Thsi is most of my code: Ext.require([ 'Ext.grid.*', 'Ext

extjs scroll's grid stop working

我与影子孤独终老i 提交于 2019-12-12 02:46:50
问题 I´ve spent a couple of days dealing with an issue about grids' vertical scroll. Scrolls just stop working under some unknown conditions, I mean, it is not deterministic I think. My application has lots of grids and most of them work perfectly always but just a couple of them just don´t. I found this Extjs Grid scroll dons't work after application running while that describes the same problem that I have currently, however a migration to a newer version is not the solution for me because after

Access controller in extjs kitchensink menu example

三世轮回 提交于 2019-12-12 02:42:50
问题 I have an ExtJs 6.2. application (modern toolkit) and I want to implement the menu example (the top menu). Therefore I have this code in my Main.js file: Ext.define('MyApp.view.main.Main', { extend: 'Ext.Container', xtype: 'app-main', layout: { type: 'vbox', pack: 'center', align: 'stretch' }, controller: 'mainController', margin: '0 0 0 0', items: [{ xtype: 'toolbar', docked: 'top', style: 'background-color: red;', items: [{ text: 'Menu', handler: function() { Ext.Viewport.toggleMenu('top');

Extjs Tagfield: How to close its list by clicking on its label in IE11?

纵然是瞬间 提交于 2019-12-12 02:39:36
问题 How to close the list of a Tagfield in Ext.js 6.0.2 by clicking on its label in Internet Explorer 11? Look into the Fiddle to test it. https://fiddle.sencha.com/#fiddle/1h9n 回答1: First, you need to understand what's going on better. The tag field isn't closing because you clicked on the label; it's closing because the tag field has lost focus. In Chrome, you can click anywhere outside of the tag field and it will close - not just on the label. This in turn gives a hint as to what's going on -

linked comboboxes with one store in Extjs 4.0

冷暖自知 提交于 2019-12-12 02:37:11
问题 I have 2 comboboxes. The first selects a category, the second selects the sub category. Both categories are stored in one store with fields: id, parentId, label. Filtering the store isn't working since both comboboxes are bound to the same store. How can I link the comboboxes? How can I filter the list of the second combobox? 回答1: Instead of referring to the same store use Ext.create() to create a new instance of the same store for the second combo box. Use select or change listeners on

How to use a file from Ext.example

风格不统一 提交于 2019-12-12 02:34:09
问题 I went through the docs to find for a Ext.example.msg but, i am unable to find it. According to this example, they have successfully used Ext.example.msg . How is this ? I had another question on SO which is related to this. UPDATE I am trying to use the following code in my application; Ext.example.msg('Button Click', 'You clicked ta button'); When i execute the code, i get an error saying TypeError: Ext.example is undefined . To overcome this error i did the following; 1.) added <script

ExtJs: How to use plugin within defined component in MVC architecture?

丶灬走出姿态 提交于 2019-12-12 02:28:54
问题 Due to the lack of experience, I can't find how to activate an upload plugin in button component using MVC architecture. When I used few files, this plugin works perfect. But when I started to move to MVC direction, everything begin to fall apart. Here is how I initialize the plugin: Ext.Loader.setConfig( { enabled: true, paths: { 'Ext.ux.upload': 'ext-4.2.1.883/src/ux/upload/' } }); Ext.require([ .... 'Ext.ux.upload.Button', 'Ext.ux.upload.plugin.Window', ..... Here is the "old way" which

can not full screen panel on android device use sencha touch 2.0 RC

旧街凉风 提交于 2019-12-12 02:25:57
问题 I am trying to make a full screen panel on android, but I can't do it. Few height is spacer. I can insert full screen html script only. How can I do full screen sencha touch panel on android? Does anyone have any ideas why this is happening? Thanks. 回答1: Here what i did in order to have my application fullscreen : requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); getWindow().addFlags

Change valueField config on Ext-JS combobox?

ぐ巨炮叔叔 提交于 2019-12-12 02:25:48
问题 I have a combobox on a form where I need to reset its store along with the 'displayField' and 'valueField' configs. Resetting the store via cmb.bindStore(newStore) works great. Setting cmb.displayField = 'newfieldname'; also works great. However, cmb.valueField = 'newValField'; does not work. The combo displays the right stuff, but when i select an item, the value is using the old valueField value, not the new one. I've tried: doing a cmb.reset() afterwards Ext.apply(...) Is it because