extjs

ExtJS 4.1 How to create a window with grid dynamically

☆樱花仙子☆ 提交于 2019-12-12 13:50:36
问题 I'm a new ExtJS user and I've a question. I have a store with cars and I create a menu with buttons to see all cars by brand or model. Now I want to display a window with a grid panel containing all my cars for a particular brand/model. Actually when I create my buttons i do that : var aCarButton = Ext.create('Ext.Button', { text: aTextButton, handler: function() { var aResultWindow = new ResultWindow(aTextButton, myCarStore, 'Brand', aBrandValue); aResultWindow.create(); } }); aMenuPanel.add

How to Extend/Override a predefined core sencha class?

ぃ、小莉子 提交于 2019-12-12 13:43:44
问题 I need to apply some changes into extjs 4.x core library to supports right-to-left direction in rendering.i already know its not good to manipulate the ExtJS code directly. My question is: How to do this via another js file that loaded into page after the ext-all.js ? its possible to change a predefined sencha class method by calling Ext.apply() ? 回答1: It really depends what exactly you need to modify. But I believe you meant the following. I have a file called ext-mods.js , which is loaded

ExtJs 4 Combobox missing config option hiddenName

断了今生、忘了曾经 提交于 2019-12-12 13:41:13
问题 I'm trying to create an ExtJs version 4 ComboBox that will post the valueField and not the displayValue. Prior version would be to set the 'hiddenName' option in the config of ComboBox, but I can't seem to find it in v 4 or something equivalent. Also, this is NOT in an ExtJs form panel. The combobox is being rendered inside a plain html form //My Code new Ext.form.ComboBox({ renderTo: 'my_div', store: new Ext.data.SimpleStore({ fields: ['value', 'name'], data: [['1', 'A'], ['2', 'B'], ['3',

display values in XTemplate like textarea format

﹥>﹥吖頭↗ 提交于 2019-12-12 13:16:28
问题 I am using the plugin rowexpander (grid) with the following template. rowBodyTpl: new Ext.XTemplate('<div>'+ '<div>'+ '<b>Vegetables:</b>'+ '<ul><li>{vegetables_types}</li></ul>'+ '</div>'+ '</div>') Displays vegetables types. Items are sent to the server with a textarea field with each value separated by paragraph, creating a sort of list. potatos carrots pumpkins If I edit these values with a textarea, they are displayed in the textarea with the same format they were sent to the server

Dynamically add xtype items to the panel with slidenavigatoin

亡梦爱人 提交于 2019-12-12 12:37:35
问题 So I'm trying to put items dynamically to the panel that has slidenavigation feature: // FlyoutNavigation.js Ext.define("APN.view.FlyoutNavigation", { id: "flyoutNavigationPanel", extend: 'Ext.ux.slidenavigation.View', Here is the initialisation of the view in another view: // MainViewContainer.js this.home = "Some var" this.flyout = Ext.create('APN.view.FlyoutNavigation', { id: 'flyoutNavigationPanel', home: this.home }); Than I'm trying to use this variable in the this.config.items section,

Cross origin communication between NGINX and spark Java

情到浓时终转凉″ 提交于 2019-12-12 12:26:23
问题 I am using NGINX and sparkjava for my web application. I am sure I have enabled all CORS headers properly. Still, I am getting "XMLHttpRequest cannot load http://localhost:3003/platformAPI/login. Invalid HTTP status code 404" error.Below mentioned are my client and server methods from extjs and spark java respectively. I have inspected the network tab of my browser to get the response and request headers sent as well. They are also mentioned below. Any help to let me know as to what's wrong

autoHeight issue in ExtJS4

こ雲淡風輕ζ 提交于 2019-12-12 12:20:31
问题 We are using autoHeight to window in ExtJS3. But now in ExtJS4 it is not working. Is there any alternative to this one? If yes,please let me know. 回答1: Read this and this, maybe it helps 回答2: dont set the height property then it should automatically get height depending on content it works for me,hope it will for u 来源: https://stackoverflow.com/questions/6758298/autoheight-issue-in-extjs4

how to give dynamic axes minimum and maximum values to chart from store sencha touch

痞子三分冷 提交于 2019-12-12 12:12:44
问题 I am using xtype:chart and this is my axes. axes: [{ type: 'numeric', minimum: 0, position: 'left', fields: ['2011', '2012', '2013'], title: 'Sales', minorTickSteps: 1, grid: { odd: { opacity: 1, fill: '#ddd', } }, style: { axisLine: false, estStepSize: 20, stroke: '#ddd', 'stroke-width': 0.5 }, minimum: 0, maximum: 1000 }, { type: 'category', position: 'bottom', fields: ['name'], title: 'Month of the Year', style: { estStepSize: 1, stroke: '#999' } }] Here is my problem, minimum and maximum

Downloading multiple files into a Zip file Javascript using data URI

拥有回忆 提交于 2019-12-12 11:34:42
问题 I am using EXT JS 4.2 which has a panel which contains a export to CSV button. On clicking on it multiple (total six) files are downloaded. I want these files to be downloaded in a single ZIP file. 回答1: There is a perfect plugin to create zip files inside browser. JSZip: https://stuk.github.io/jszip/ Install the plugin by adding js files manually: download JSZip and include the file dist/jszip.js or dist/jszip.min.js JSFiddle - JSZip 3.0: https://jsfiddle.net/andrebonna/u8zsbzau/ var zip =

Extjs: upload file with submit form

℡╲_俬逩灬. 提交于 2019-12-12 11:14:32
问题 I'm trying to upload file (excel) using ExtJs and Spring without luck, so I hope you will help me. In panel I have a button (fileuploadfield) and with that I select a file, which I want to upload. . . ,{ xtype: 'fileuploadfield', buttonOnly: true, hideLabel: true, buttonText: "Importuoti excel failą", border: false, itemId: "uploadBtn", name: 'file' }, . . This is my controller. Every time I choose file with fileuploadfield it activates function uploadFile(). init: function() { var me = this;