extjs

Clearing multiple direction results of a google map

99封情书 提交于 2019-12-25 18:20:12
问题 I am leveraging Google Maps V3 javascript api within Ext Js 5.0.0 framework in order to display directions on a map. Everything works fine and directions are rendered and cleared perfectly except for one test case, steps described below: Step 1.Get Directions from address 1 to address 2 (works fine and displayed on map) Step 2.Get Directions from address 3 to address 4, 5 to 6...(n-1) to n (works fine and all sets of directions are seen on map) Step 3. Run directionsDisplay.setMap(null) to

Trying to bind a store to a ViewModel

丶灬走出姿态 提交于 2019-12-25 17:01:58
问题 I'm used to ExtJs with MVC pattern, and I'm trying to implement MVVM pattern. I'm not able to bind a store to my view. I have a main grid, and try to open a details grid when selecting a line. detailsView = mainPanel.add({ xtype: 'rma-details', viewModel: {data: {id: id}} }) Ext.define('Mb.view.rma.Details', { extend: 'Ext.grid.Panel', alias: 'widget.rma-details', requires: [ 'Mb.view.rma.DetailsController', 'Mb.view.rma.DetailsModel' ], controller: 'rma-details', viewModel: {type: 'rma

Hibernate: Query Metadata

此生再无相见时 提交于 2019-12-25 16:43:37
问题 I'm currently working on a solution to automatically generate ExtJS forms based on a hibernate mapping (I use hibernate reverse engineering for that based on @Annotations). Hibernate has a getPropertiesInterator() http://docs.jboss.org/hibernate/core/3.5/api/org/hibernate/mapping/PersistentClass.html#getPropertyIterator%28%29 funciton for that. Which is accessible like this ((LocalSessionFactoryBean)sessionFactory).getConfiguration().getClassMapping(<Classname>.class.getName()) Which lists

ExtJS 4 Grid Panel - Spacebar row toggle

我是研究僧i 提交于 2019-12-25 15:15:42
问题 In ExtJS 4, selecting a row in a Grid Panel (by clicking it), and pressing the spacebar selects and de-selects the row. It was not like this in ExtJS 3, and I would like to disable this feature. Any ideas? I've begin looking into Ext.util.KeyMap to see if I could override it somehow. Thanks in advance. 回答1: You have to override the onKeyPress method of the the Ext.selection.RowModel . The shipped implementation is onKeyPress: function(e, t) { if (e.getKey() === e.SPACE) { e.stopEvent(); var

How to end the session when browser closes

若如初见. 提交于 2019-12-25 14:32:20
问题 In my application I am saving the logout time of the user. This is working fine when the user clicks the login button, but my requirement is to store the logout time even if the user closes the browser. If this is not possible please tell me the way how to destroy the session as soon as user closes the window. Any help would be appreciated. 回答1: It used to be you had to do synchronous Ajax in the event handler. Don't know if that's still true in modern browsers. If you go asynchronous, be

How to end the session when browser closes

我只是一个虾纸丫 提交于 2019-12-25 14:31:04
问题 In my application I am saving the logout time of the user. This is working fine when the user clicks the login button, but my requirement is to store the logout time even if the user closes the browser. If this is not possible please tell me the way how to destroy the session as soon as user closes the window. Any help would be appreciated. 回答1: It used to be you had to do synchronous Ajax in the event handler. Don't know if that's still true in modern browsers. If you go asynchronous, be

ExtJS - 'combocolumn' based renderer - rowediting does not register event or do what it is supposed to

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-25 14:25:18
问题 http://2gears.com/2011/05/combobox-editor-remote-and-renderer-for-extjs-editorgridpanel/comment-page-2/#comment-11050? Please see the function. I am not using the 'combocolumn' completely. However i have used the major components. Please advise if there is a possibility it should work. As of now the grid refuses to render the column itself and I am unable to pinpoint what the bug is as the code is simply the same? I did this not to act smart :) - but to simplify and run it on 1 column before

How to set custom folder names for views stores and models on ExtJs 4 application?

懵懂的女人 提交于 2019-12-25 14:11:29
问题 I ask this because there is an existing application that I would like to enable for using Sencha CMD so first step is to instantiate it via: Ext.Application which presents the first problem: folder structure is someApp --Views --Model --Store --moreFolders (should be model, store, view) Rather than refactoring hundreds of classes(huge app) I want to set the folders path if possible. Can you think in any drawbacks? What would your approach be? Any ideas are very well received. Using ExtJs 4.1

How to set custom folder names for views stores and models on ExtJs 4 application?

冷暖自知 提交于 2019-12-25 14:11:13
问题 I ask this because there is an existing application that I would like to enable for using Sencha CMD so first step is to instantiate it via: Ext.Application which presents the first problem: folder structure is someApp --Views --Model --Store --moreFolders (should be model, store, view) Rather than refactoring hundreds of classes(huge app) I want to set the folders path if possible. Can you think in any drawbacks? What would your approach be? Any ideas are very well received. Using ExtJs 4.1

Is Sencha ExtJS association POST wrong?

本小妞迷上赌 提交于 2019-12-25 11:54:48
问题 So, I have a problem using Sencha ExtJs 4.1 Associations. I have something like: Models Ext.define('Tpl.model.User', { extend: 'Ext.data.Model', requires: ['Tpl.model.PostTemplate'], fields: [ { name: 'id', type: 'int' }, { name: 'name', type: 'string' }, { name: 'postTemplate', type: 'int' } ], associations: [ { type: 'belongsTo', name: 'postTemplate', model:'Tpl.model.PostTemplate', associationKey: 'postTemplate', primaryKey: 'id', foreignKey: 'postTemplate' } ] }); and Ext.define('Tpl