extjs

Restrict the input characters in textfield / numberfield using regular expression?

老子叫甜甜 提交于 2019-12-22 01:48:20
问题 I use numberField in ExtJS Form and want to enter only positive numbers, in range of 0-99 and it should accept only 2 characters (and not more than 2). { xtype:"textfield", allowNegative: false, allowDecimals: false, minValue: 0, maxValue: 99, maxLength: 2 } gives an error in above code but it is accepting more then 2 characters. I also tried below but issue is same: { xtype:"textfield", regex: /^\d{0,2}$/, regexText: "<b>Error</b></br>Invalid Number entered.", validator: function(v) { return

How to Create sencha touch app in window phone 8?

China☆狼群 提交于 2019-12-22 01:06:27
问题 I want to make native window phone 8 build from sencha touch. I have also tried phonegap but no succeeded. 回答1: All you have to do is, create your project/app using Sencha Touch and wrap it up using PhoneGap/Cordova. Please follow the below links to gain some insights on how to use PhoneGap to build Windows app. http://www.sencha.com/learn/getting-started-with-sencha-touch-2 http://docs.phonegap.com/en/2.4.0/guide_getting-started_windows-phone-8_index.md.html http://msdn.microsoft.com/en-us

Ext.Net RadioGroup CheckedItems is always null

泄露秘密 提交于 2019-12-22 00:55:07
问题 I'm seeing strange behaviour from Ext.Net 2.0: RadioGroup.CheckedItems is always zero in my change handler callback. In my code below RadioGroup1.CheckedItems is ALWAYS zero after checking. What am I doing wrong / how can I solve this? [DirectMethod] public void TxtVisibility() { foreach (var item in RadioGroup1.CheckedItems) { if (item.ID == "rdHourly") { txtPerHour.Hidden = false; txtAtTime.Hidden = true; } else if (item.ID == "rdAtHourly") { txtPerHour.Hidden = true; txtAtTime.Hidden =

Ext JS: FormPanel not populating fields with JSON data

浪子不回头ぞ 提交于 2019-12-22 00:36:02
问题 I have a FormPanel with 3 fields and a JsonReader. Here's the setup: var goalPanel = new Ext.FormPanel({ reader: new Ext.data.JsonReader({ idProperty: 'id', root: 'items', fields: [ {name: 'referenceSales', type:'float'}, {name: 'increasePercentage', type: 'float'}, {name: 'salesGoal', type: 'float'} ] }), labelAlign: 'top', frame:true, bodyStyle:'padding:5px 5px 0', items: [{ layout:'column', items:[{ columnWidth:.33, layout: 'form', items: [{ fieldLabel: 'Reference Sales', xtype:

ExtJS: Add Single Click Action To A Node In A TreePanel

倾然丶 夕夏残阳落幕 提交于 2019-12-22 00:21:39
问题 [revised] I'm creating a TreePanel in ExtJs that is loading its children from a JSON file. I'm having trouble adding a click action to the nodes. I'm not sure whether it's added in the script creating the tree, or if its added as a property in the JSON, and if so, what the syntax would be. Any help would be appreciated! Please provide an example if possible. 回答1: Add a listener to the TreePanel: listeners: { click: function(node, event){ console.log(node); } } and use the data in the node.

How can I create several ExtJs apps without duplicating the Framework

狂风中的少年 提交于 2019-12-21 23:16:37
问题 I'm developing some Extjs 6 applications. I'm using Sench Cmd 6 for creating new application. For every project, It creates a new copy of my lilbrary files. I want to re use the library files rather than duplicate them. | -- library files | -- Project 1 | -- Project 2 | -- etc. How can I do it ? 回答1: You need to create first a workspace . Then any app as you want. Would be something like sencha -sdk "/Sencha/ext-6.0.0" generate workspace "/dev/workspace/" sencha -sdk "/Sencha/ext-6.0.0"

ExtJs4 Json TreeStore?

霸气de小男生 提交于 2019-12-21 23:01:42
问题 I am migrating my ExtJs3 application to ExtJs4. In ExtJs3 I had a tree grid which had a loader to load the tree data, like below: loader: new Ext.tree.TreeLoader({ dataUrl: 'Department/DepartmentTree', nestedRoot: 'Data.items' }) So I am trying to create a treeStore in ExtJs4 like below: var store = Ext.create('Ext.data.TreeStore', { model: 'DepartmentTreeModel', folderSort: true, proxy: { type: 'ajax', url: 'Department/DepartmentTree', reader: { type: 'json', root: 'Data.items' } } }); I get

ExtJS container with border layout and dynamic height children

五迷三道 提交于 2019-12-21 21:45:30
问题 I would like to have a container with border layout (I need the split bar) with two regions, west and center. The west region contains a treepanel that can expand (because it's a treepanel) and I don't know the number of nodes. The center region is also a container that holds a grid and I don't know the number of rows. So both regions' height is unknown until the page is loaded. I also want the page to be scrollable in case one of the regions are bigger than the page. I managed to do so when

ExtJS4 store proxy url override

烂漫一生 提交于 2019-12-21 21:43:00
问题 I am trying to reuse a store by altering proxy url (actual endpoint rather than params). Is it possible to override proxy URL for a store instance wih the following syntax: { ...some view config ... store: Ext.create('MyApp.store.MyTasks',{proxy:{url:'task/my.json'}}), } if proxy is already well defined on the Store definition? EDIT : AbstractStore source code sets proxy the following way if (Ext.isString(proxy)) { proxy = { type: proxy }; } SOLUTION : store.getProxy().url = 'task/myMethod

How to manage PagingToolbar in Ext-js 4.2 correctly?

笑着哭i 提交于 2019-12-21 21:36:26
问题 js 4.2), and I've got some problems when I manage a toolbar on a grid which use a Proxy (ajax). this.grid = new Ext.create('Ext.grid.Panel',{ region : 'center', loadMask : true, layout : 'fit', store : 'Contenedores', tbar: [ { text: 'Exportar Excel' }, '->', { text:'Buscar', handler: this.buscar, scope: this}, '-', { text:'Limpiar', handler: this.limpiar, scope: this} ], columns : [], bbar : new Ext.create('Ext.toolbar.Paging',{ store: 'Contenedores', displayInfo: true, displayMsg :