extjs

Populating grid and form with same json?

拟墨画扇 提交于 2019-12-11 09:20:18
问题 Is it possible to populate grid with some of the JSON data and a form with other, from the same JSON? Two stores or two models or both? simple example... ;-) 回答1: Yes, the best way to do this would be to manipulate the reader, which as well as returning records, also stores whatever the raw json sent from the server is. The easiest solution would be to specify the reader parameters for your grid, but then have a listener on the store, which then processed the rawData property from the reader

sencha touch list tpl event reference

人走茶凉 提交于 2019-12-11 09:18:34
问题 In my list view, I put addEventListener ( alias on ) in my initialize event initialize: function (component) { component.element.on({ tap: { scope: this, fn: 'onTap', delegate: 'div.side-itemDelete' } }); }, But if there are more delegate ( other element with id or class) I need to bind an event, how can I handle it? This is my XTemplate: new Ext.XTemplate( '<div class="side-weatherListItem no-dragging">', '<div class="side-itemLocation">', '<div>{[values.city.toUpperCase()]}</div>', '<div>{

ExtJS 4.1.1a: Why no getApplication() method for my app?

☆樱花仙子☆ 提交于 2019-12-11 09:18:33
问题 I started with https://github.com/mclin/extjs-mvc-example, and set out to modify it so that it used Ext.application, instead of just using Ext.Create() for a subclass of Ext.app.Application. So far so good, until I try to use the getApplication() function, which isn't there. The code of the app definition looks like ... Ext.application({ name: 'Books', extend: 'some.class.name', controllers: ['Books'], ... }); The result of this is a global object named 'Books', alright, but it does not

Extjs 4.1 What layout for 3 components scrollable

泪湿孤枕 提交于 2019-12-11 08:58:52
问题 I have a formPanel and two tabPanel in a Panel ( region : west ). My "TabPanel 1" has dynamic height (it depends on selected comboboxes), so the height has to be automatic. TabPanel 2 don't have to. I tried layout : anchor as well as layout : { xtype : 'vbox', align : 'stretch', pack: 'start'} but it doesn't work,the elements in the tabpanel 1 are hidden by the tabpanel 2. Here is the code for the panel : var West_panel = Ext.create('Ext.Panel', { id : 'West_panel_id', region : 'west', header

Error upgrading from ExtJs3 to ExtJs4-''members is udefined" in compat mode?

僤鯓⒐⒋嵵緔 提交于 2019-12-11 08:58:30
问题 I'm updating my project from Ext3.3 to Ext4. I have added the ext3-core-compat.js and ext3-compat.js files after added the new ext4 ext-all-debug.js file. I am getting a members is udefined error on line 3262 of ext-all-debug.js. Which is inside the Ext.extend method which accepts 3 parameters: Ext.extend = function(subclass, superclass, members) i can see from the ExtJs4 documentation that Ext.extend is deprecated, however I just want to get my code working before I change all of my Ext

Set a minimum limit in a custom multifield component

有些话、适合烂在心里 提交于 2019-12-11 08:52:47
问题 I have a custom multifield component with a maximum limit of 5 elements applied to the 'Add Item' button. I need to add a similar listener logic to the 'OK' button of the dialog box to check if the minimum number of items (3) have been added or not. How can that be achieved ? I didn't find any sample code to add a listener code to the button .. 回答1: I've done this same sort of thing with a listener on the beforesubmit event of the Dialog (see beforesubmit for CQ.Dialog at http://dev.day.com

ExtJS & IE7: Rendering problems with simple window

▼魔方 西西 提交于 2019-12-11 08:50:57
问题 I have created this very simple window extension. In Firefox it looks like it should, but in IE7, the contained items flow out of the window. What can I do to fix this? Code: (Doctype is strict, but won't display for some reason) <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Online example</title> <link rel="stylesheet" type="text/css" href="http://dev.sencha.com/deploy/dev/resources/css/ext-all.css" /> <script type="text/javascript" src="http:/

Failed to execute 'querySelectorAll' on 'Element' in ExtJS 5

风格不统一 提交于 2019-12-11 08:49:13
问题 I am trying for using Ext.dom.Query.Select method to find all divs which having class name square and highlightedReactangle.Same method was working with extjs 4 , but after up grading to extjs 5 it start throwing error. Uncaught SyntaxError: Failed to execute 'querySelectorAll' on 'Element': 'div:any(div.square|div.highlightedReactangle|div.highlightedReactangleIE|div.pin|div.redCircleCount|div.stampPreviewCls)' is not a valid selector. The statement I'm using to find related div is, this.el

How do I make an ExtJS drag and drop tree be copy only — not remove items from the display?

自古美人都是妖i 提交于 2019-12-11 08:46:46
问题 I've created a tree using the treeviewdragdrop plugin like this: Ext.create('Ext.tree.Panel', { viewConfig: { plugins: { ptype: 'treeviewdragdrop' }, listeners: { drop: function (... do stuff By default if you drag an item from one parent to another it moves it and you can ctrl-click to copy, but I just want to copy -- that is, I don't want it to stop displaying in the original node. I'm not doing anything in the drop to affect the store, so I'm not forcing a remove 回答1: Oh, this was easy.