extjs4

Ext deployed application: ext.js vs ext-all.js - what's a better option?

☆樱花仙子☆ 提交于 2019-12-06 07:46:30
Looking at the deploy process for an ExtJS 4 application I performed the following steps (using SDK Tools 2.0.0-beta3): sencha create jsb -a http://localhost:8080/myapp/ -p app.jsb3 sencha build -p app.jsb3 -d . This created for me all-classes.js and app-all.js . The next step was to switch form ext-all.js to ext.js . Doing that my app stop working. Looking at the console, I noticed that Ext tried to load the required classes separately, from a src folder. src/AbstractPlugin.js?_dc=1372193551701 So, I'm assuming that ext.js requires the src folder that have the unminified version of the

ExtJS4 LinkButton Component

元气小坏坏 提交于 2019-12-06 07:42:18
问题 I'm trying to create my own LinkButton component in Ext JS 4. Nothing new, right? My code looks like this: Ext.define('LinkButton', { extend: 'Ext.Component', xtype: 'linkbutton', autoEl: 'a', renderTpl: '<a href=\"javascript:;\">{text}</a>', config: { text: '', handler: function () { } }, initComponent: function () { var me = this; me.callParent(arguments); this.renderData = { text: this.getText() }; var handler = me.getHandler(); if (handler) { me.on('click', handler); } } }); So far so

Is there a way to minify an ExtJS application without Sencha CMD?

久未见 提交于 2019-12-06 07:36:23
问题 I have an existing ExtJS app developed using ExtJS 4.2.1. I am using Closure minifier through Maven plugin minify-maven-plugin. The generated minified JS files (without merge) works fine. However, generated merged minified file throws undefined errors because the definition comes later in the merged file. My question is, is there a way I can figure out the order I have to provide the plugin? (I don't want to use Sencha Cmd) The app folder follows the structure app/common, app/controller, app

how to scroll extjs 4 grid horizontally

烈酒焚心 提交于 2019-12-06 07:24:26
What is the proper way to scroll a grid horizontally on load. I want to scroll to a particular grid column on load. I can focus the column I want using this: dataStore.on('load', function() { var cl = dataGrid.columns[43]; cl.focus(); }); but the grid does not scroll when I do this. One possibility is to use scrollByDeltaX . Example: viewready: function(){ var c = this.columns[5]; var p = c.getPosition(); this.scrollByDeltaX(p[0]); } Working sample: http://jsfiddle.net/YRraU/2/ 来源: https://stackoverflow.com/questions/13545674/how-to-scroll-extjs-4-grid-horizontally

Ext.data.Store getTotalCount() doesn't calculate after load

試著忘記壹切 提交于 2019-12-06 06:49:03
问题 My store doesn't always return the right amount of records when calling getTotalCount() . This problem occurs after I load() the store. I know that there are records in the store at that point of checking. I am using ExtJs 4.1.3 //this.grid = reference to my grid var count = this.grid.getStore().getCount(), //50 total = this.grid.getStore().getTotalCount(); //16000 this.grid.getStore().load(); count = this.grid.getStore().getCount(); //50 total = this.grid.getStore().getTotalCount(); //0 How

Ext grid filtering default filter activation on loading

流过昼夜 提交于 2019-12-06 06:32:31
I have added default remote filter to grid for column 'hiddenFlag', however it is not active on first loading. When I click column header menu, filter seem to be active however records is now appropriate. I should deactivate and activate it again. how, I can configure it to be active for the first load also? Ext.define('Ext.migration.CommentGrid', { extend: 'Ext.grid.Panel', alias: 'widget.commentgrid', xtype: 'grid', initComponent: function(){ filePath = ""; this.filters = { ftype: 'filters', encode: false, // json encode the filter query local: false, //only filter locally filters: [{ type:

ExtJS 4 - How to download a file using Ajax?

末鹿安然 提交于 2019-12-06 05:38:21
I have a form with various textfields and two buttons - Export to Excel and Export to CSV. The user can provide the values to different fields in the form and click one of the buttons. Expected behaviour is that an Ajax request should be fired carrying the values of fields as parameters and the chosen file (Excel/CSV as per the button click) should get downloaded (I am not submitting the form as there needs to be done some processing at the values before submit). I have been using the following code in success function of Ajax request for the download: result = Ext.decode(response.responseText

ExtJS 4 - Wrapping the column headers in grid panel

血红的双手。 提交于 2019-12-06 04:12:05
问题 I have a grid which has long phrases as header texts. These texts are never displayed properly in the available width for the column. Is there any way these texts can be wrapped and limited to the column width? Here is an image of the issue: 回答1: Give this a shot in your CSS: .x-grid3-hd-inner { overflow: hidden; padding: 3px 3px 3px 5px; white-space: normal; } And additionally, another option if the first doesn't work: .x-column-header-inner .x-column-header-text { white-space: normal; } .x

Dynamic Proxy URL for store.load() in MVC architecture with Ext JS

会有一股神秘感。 提交于 2019-12-06 04:10:06
I want to change the proxy of a store before (!) it is loaded. The specific problem in this case is that I do not find the right moment, when to load. In detail: I have created a MVC-model by creating a view, a controller, a model, and a store as defined by EXTJS4 architecture. The view is a grid panel. It defines the store within its own define statement: Ext.define('P.view.MyView' ,{ extend: 'Ext.grid.Panel', alias : 'widget.MyView', ... store: 'MyStore', ... } When I load the store with "autoload:true" everything works fine, but of course the proxy is then static as defined in the code.

ExtJS 4 Combobox event for selecting selected value

僤鯓⒐⒋嵵緔 提交于 2019-12-06 04:07:13
For some reason I need to know when user has selected value from combobox even if it is already selected. "Select" event works only if user selects unselected item. I don't see any event like "itemclick" in the docs for combobox or picker. Any ideas? ComboBox uses BoundList for representing dropdown list. BoundList fires itemclick event. You can use ComboBox 's listConfig config in order to setup BoundList listeners: Ext.create('Ext.form.ComboBox', { // ... listConfig: { listeners: { itemclick: function(list, record) { alert(record.get('name') + ' clicked'); } } } } Check out the demo . 来源: