extjs

Reusable Action in Ext JS MVC

放肆的年华 提交于 2020-01-03 02:50:14
问题 I have a Grid Panel with a toolbar and an context menu. The toolbar has a edit button and the context menu has a edit menu item. Both shares the same properties (text, icon and handler) Ext has something called Action which makes it possible to share functionality etc. between components, but til now I have had no success getting it to work in the MVC architecture (I am using the new MVC architecture in 4.0) My Action class looks like this: Ext.define( 'App.action.EditAction', { extend: 'Ext

Sencha Touch XML Parsing Issue

僤鯓⒐⒋嵵緔 提交于 2020-01-03 02:50:13
问题 I am new to Sencha Touch framework. I tried using the Documentation to make a demo application. I am trying to display records from a XML file and display it in table format. I am not able to understand what I am doing wrong. I am getting the Dock at the top of the screen and a blank page. Below is my code Index.js Ext.setup({ onReady: function(){ Ext.regModel('User', { fields: ['id', 'name', 'email'] }); var store = new Ext.data.Store({ model: 'User', proxy: { type: 'ajax', url : 'users.xml'

Expand a tree path by sending the internalId as parameter

ぐ巨炮叔叔 提交于 2020-01-03 02:47:28
问题 Please consider the situation: I'm using Extjs' tree.Panel to have some sort of navigation on a page. I have a list of items in another portion of the page, whose list items have a unique id that matches the internalId of a node in the tree. I wish to bind a click for each list item and expand the tree to the node specified by the id on the item. I intend to use the expandPath(path) method from the tree. My question would be: how can I get the path string with just the internalId ? Thank you.

Ext.ComponentLoader lazy loading html+js within component

廉价感情. 提交于 2020-01-03 02:25:18
问题 I have four files: layout.html //contains ext resources layout.js //contains my panel partial.html //contains <script src="partial.js"> partial.js //contains a component I have this panel configured in my layout.js: var myPanel = Ext.widget('panel',{ title: 'Load HTML into panel', html: 'initial', width: 300, height: 300, loader: { url: 'partial.html', renderer: 'html', scripts: true, autoLoad: true }, renderTo: Ext.getBody() }); And this code in my partial.js Ext.onReady(function(){ var

Get JSON Data from ExtJS TreePanel

依然范特西╮ 提交于 2020-01-02 19:10:21
问题 Lets say I have a Ext.tree.TreePanel object, and it has data loaded from an external file, ex: var tree = new Ext.tree.TreePanel({ ... loader: new Ext.tree.TreeLoader({ dataUrl:'./some_file.json' }), ... }); This file is an array of objects that define the tree. Lets say the user adds new nodes to the tree and moves some nodes around. Is there away to get the JSON data from the tree so that it could be used for the next time the user loads the tree? EDIT (code solution) : Here is a solution

form validation before direct click event fire

元气小坏坏 提交于 2020-01-02 16:15:23
问题 I have a button,I want to form validation(client side) before direct click event fire.I tryed lots of way but failed. ** I already set textbox like this. <ext:TextField ID="Ad" runat="server" FieldLabel="Dem ad" Flex="1" AllowBlank="false" CausesValidation="true"> </ext:TextField> but still fire direct even before textbox checking <ext:Button ID="Button1" runat="server" Text="save" Icon="Disk"> <DirectEvents> <Click OnEvent="Dem"> <Confirmation ConfirmRequest="true" Title="Title" Message="are

how to make a “MVC Application” with extjs 4.0 beta 3?

与世无争的帅哥 提交于 2020-01-02 14:30:47
问题 Is there someone here who made a MVC application using EXTJS 4 BETA 3? and works fine?? please help me how?, .. I have followed step by step here .. and @Abdel Olakara help but there is still an error ... here my firebug [Ext.Loader] Synchronously loading 'AM.controller.Users'; consider adding Ext.require('AM.controller.Users') above Ext.onReady [Ext.Loader] Synchronously loading 'AM.store.Users'; consider adding Ext.require('AM.store.Users') above Ext.onReady this.getView('Viewport') is null

Extjs 4: Time Stacked Bar Chart, possible?

喜夏-厌秋 提交于 2020-01-02 11:27:14
问题 Hi I'm trying to accomplish a time stacked bar chart where the input data looks like this: {"name":"Folienwechsel", "starttime":"02/29/2012 09:50:07", "endtime":"02/29/2012 09:50:46", "duration":38546.0}, {"name":"Pause", "starttime":"02/29/2012 09:50:46", "endtime":"02/29/2012 09:51:36", "duration":49943.0}, {"name":"Wartezeiten", "starttime":"02/29/2012 09:51:36", "endtime":"02/29/2012 10:04:43", "duration":787086.0} As you see the start time and end time are continued, when a state finish

How to get details from checking CheckBox in grid?

旧城冷巷雨未停 提交于 2020-01-02 11:21:35
问题 I have EditorGridPanel, the grid's ColumnModel includes TextField, ComboBox and CheckBox. After editing TextField or ComboBox, "afteredit" event, which contains details about the edited field, fired. When I checking/unchecking the CheckBox field, there is no event that gives any detail about which CheckBox pressed. 回答1: A selection model renders a column of checkboxes that can be toggled to select or deselect rows in grid. try applying listeners on check box selection model. docs : Ext

stop extjs TextField from accepting blanks and spaces

て烟熏妆下的殇ゞ 提交于 2020-01-02 08:00:11
问题 This is my textfield siteNameField = new Ext.form.TextField({ id: 'siteNameField', fieldLabel: 'Site Name', maxLength: 50, allowBlank: false, anchor:'-15', xtype:'textfield', maskRe: /([a-zA-Z0-9\s]+)$/ }); As you can see it already has a check for blanks. But text field accepts space and I don't want that. I want no blank fields ... anything other than 'ONLY' spaces is acceptable . Here is the FormPanel Code voiceSiteCreateForm = new Ext.FormPanel({ labelAlign: 'top', bodyStyle:'padding:5px'