extjs

ExtJs: Search / Filter within a ComboBox

断了今生、忘了曾经 提交于 2019-12-19 03:37:18
问题 I've the following problem / question in ExtJs 2.3: I'd like to do a search within a combobox. I'll give you an example: Ext.comboData.names = [['Peter', 'Paul', 'Amanda']]; var store = new Ext.data.SimpleStore({ fields: ['name'], data: Ext.comboData.names }); var combo = new Ext.form.ComboBox({ name: '...', id: '...', store: store, displayField: 'name', typeAhead: true, mode: 'local', forceSelection: false, triggerAction: 'all', emptyText: '-', selectOnFocus: true, applyTo: '...', hiddenName

Javascript Error - Can't find variable : google

社会主义新天地 提交于 2019-12-19 03:15:25
问题 The code I wrote runs absolutely fine on the browser. But when I connect to wifi on the iPhone I get an error in the debugger : Javascript Error - Can't find variable : google This occurs whenever I call any google maps/directions/geoLocation object. The code is as follows : map = new Ext.Map({ mapOptions : { center : center, zoom : 20, // mapTypeId : google.maps.MapTypeId.ROADMAP, navigationControl: true, navigationControlOptions: { style: google.maps.NavigationControlStyle.DEFAULT } },

Ext 4.1.1: Add new record to Store

天大地大妈咪最大 提交于 2019-12-18 22:59:10
问题 I would like to add records after the initialization of a store. I tried loadData(), loadRawData(), add() but nothing seams to work. Here is my jsfiddle: http://jsfiddle.net/charlesbourasseau/zVvLc Any ideas ? 回答1: You need to set queryMode: 'local' in the combo box. Minimal example: Ext.onReady(function() { var store = Ext.create('Ext.data.Store', { alias: 'store.ModeStore', autoLoad: false, fields: [{ name: 'mode', type: 'string' }, { name: 'id', type: 'string' }], data: [{ mode: 'mode1',

How can I let users upload files by copy/paste?

老子叫甜甜 提交于 2019-12-18 22:16:21
问题 This question was migrated from Stack Apps because it can be answered on Stack Overflow. Migrated 8 years ago . I'm trying to create a web app based on ExtJS, and I'm working on the file-upload area of the app. I want users to be able to upload files by copying and pasting them - not just copying and pasting the contents of the file, but the file itself. For example, in Windows, you can choose "Copy" or "Cut" from the Edit menu while a file is selected, then choose "Paste" later and copy or

ExtJS 4.1 - Returning Associated Data in Model.Save() Response

强颜欢笑 提交于 2019-12-18 19:12:01
问题 I am curious as to why the record contained in the result set of a Model.save() response does not properly return updated associated data, despite the updated data being contained in the server response... Example Model & Store Definition: Ext.define("App.model.test.Parent",{ extend: 'Ext.data.Model', requires: ['App.model.test.Child'], fields: [ {name: 'id', type: 'int' }, {name: 'name', type: 'string'}, {name: 'kids', type: 'auto', defaultValue: []} ], idProperty: 'id', hasMany: [{

Best Way to Organize an ExtJS Project

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-18 18:56:27
问题 I've just started developing an ExtJS application that I plan to support with a very lightweight JSON PHP service. Other than that, it will be standalone. My question is, what is the best way to organize the files and classes that will inevitably come into existence? Anyone have any experience with large ExtJS projects (several thousand lines). ­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­­ 回答1: I would start here http://blog.extjs.eu/know-how/writing-a-big-application-in-ext/ This site gives a good

Rearrange items of DataView with Drag and Drop

自古美人都是妖i 提交于 2019-12-18 18:20:55
问题 I have an ExtJS DataView with following template: <ul> <tpl for="."> <li class="report-field" id="{listId}"> {[this.getReorderLinks(values, xindex, xcount)]} <span class="field-title small" data-qtip="{displayName}">{displayName}</span> <i class="field-remove" title="' + deleteLabel + '"></i> </li> </tpl> </ul> Which makes each list of items look like this: Where user can click on different icons and perform related action, moving up/down in order and remove. Note that these items are added

Warning saying `Id` exist and should be destroyed

爷,独闯天下 提交于 2019-12-18 17:57:21
问题 Most of the time i see the following Warning, when i click on the same button for more than once (when calling the same function twice or more) [WARN] [WARN][Ext.Component#constructor] Registering a component with a id (`name`) which has already been used. Please ensure the existing component has been destroyed (`Ext.Component#destroy()`. How should i destroy it as the Warning suggest ? or how should i fix this ? UPDATE function onPersonFound(imageData) { var image = Ext.create('Ext.Img', {

Loading data into List using store sencha touch 2

允我心安 提交于 2019-12-18 17:11:36
问题 I have created navigaton view using Sencha touch 2. Navigation view has list component which i want to load it using store and model. I created model and store as required. On running my app the list does not render any data. It also gives warning in conolse [Ext.dataview.List#applyStore] The specified Store cannot be found . I am not sure what this error means. Here is my mvc code, model: Ext.define('GS.model.BlogModel', { extend: 'Ext.data.Model', config: { fields: [ {name: 'title', type:

Ext JS on click event

一世执手 提交于 2019-12-18 16:59:12
问题 I have the following event: Ext.onReady(function() { Ext.select('.gallery-item img').on('click', function(e) { Ext.select('.gallery-item').removeClass('gallery-item-selected'); Ext.get(e.target).parent().addClass('gallery-item-selected'); }); }); Which works fine when the page loads. However I dynamically create additional divs of the class gallery-item with a image inside them. The click event stops working once I create a new item. How may I update this binding? Thanks. 回答1: Ext.select