extjs

Sencha touch2: How can i parse my nested json data?

拥有回忆 提交于 2019-12-13 04:29:49
问题 i could not able to parse my nested json data and i tried in many ways but i could not succeed. any help is appreciated. Here is my json output looks like: [ { "task": { "locator": "FGWESD", "subtask": [ { "work": { "number": "1145", "id": "0", "status": true, "gate": "N\/A", }, "sequenceNumber": "0", "id": "0" }, { "work": { "number": "1145", "id": "0", "status": true, "gate": "N\/A", }, "sequenceNumber": "0", "id": "0" } ], "connectTime": "0", "id": "0" } } ] Here is my model: Ext.define(

Unable to create ExtJS tree from json

拟墨画扇 提交于 2019-12-13 04:26:01
问题 I am trying to create a tree from json file. The JSON data is: [ { "root": { "text": "Root Node", "expanded": true, "children": [ { "text": "Invisible", "leaf": true, "children": [ { "text": "Bookmark 2", "leaf": true }, { "text": "Bookmark 3", "leaf": true } ] }, { "text": "Visible", "leaf": true, "children": [ { "text": "Bookmark 4", "leaf": true }, { "text": "Bookmark 5", "leaf": true } ] } ] } } ] Here is the code I am using for my store: Ext.define('DHT.store.Categories', { extend: 'Ext

Sencha/Ext - How manipulate SVG Element included inside an svg file ?!

心已入冬 提交于 2019-12-13 04:25:41
问题 This is my problem.... 'mon' function works if i set html property directly with svg code like this: html: '<svg><text id="ID">Example</text></svg> I can manage elements by ID and set an event. But, if i recall an svg file by tag EMBED or iFRAME like this: html: '<embed src="abc.svg">' the elements included in svg file are hidden!! If i write for example alert(Ext.get("ID")) with 'ID' refers to an Html Element included in 'abc.svg' file, chrome debugger says: Uncaught TypeError: Cannot read

ExtJS PHP/MySQL backend connector error

爷,独闯天下 提交于 2019-12-13 04:04:40
问题 exactly the same problem than on this post follow carefully the documentation (official) https://docs.sencha.com/extjs/6.5.3/guides/backend_connectors/direct/mysql_php.html did not understand how to solve it edit here is a screenshot of firefox console api.php (the file where the error is) (took from ext js documentation and sdk examples) <?php require('config.php'); header('Content-Type: text/javascript'); $API = get_extdirect_api('api'); # convert API config to Ext Direct spec $actions =

How can I access other extJS objects from within extJS click events?

独自空忆成欢 提交于 2019-12-13 03:54:59
问题 In the below code in the click event for my menuItem1 object, how can I change the html content of the renderContent object so when the user clicks the menu item's header, the content in the middle of the page changes? (In all the examples I look at, the click events are creating new objects but not changing existing objects.) Ext.onReady(function(){ var menuItem1 = new Ext.Panel({ id: 'panelStart', title: 'Start', html: 'This is the start menu item.', cls:'menuItem' }); var menuItem2 = new

ExtJS: Setting defaults to panel items for nested objects

此生再无相见时 提交于 2019-12-13 03:52:17
问题 This question is part of How to set defaults for Grid columns within initComponent and posted here independently through @scebotari66 advice on main post. As you'll notice below; there is Ext.Array.map to define defaults for related function. // Statment initComponent: function () { var me = this; me.items = Ext.Array.merge( me.getFormSt(), Ext.Array.map(me.getForm(), function (listFldConfig) { //Aim to using the array map function to set flex property for subset fields listFldConfig.flex = 1

How to call this onclick javascript function in my architecture

梦想与她 提交于 2019-12-13 03:49:14
问题 I am using this article of architecture http://blog.extjs.eu/know-how/writing-a-big-application-in-ext/ In my one class of Dashboardgrid i have two functions are : ,linkRenderer : function (data, cell, record, rowIndex, columnIndex, store) { if (data != null) { return '<a href="javascript:void(0)" onclick="this.resellerwindow(\'' +record.data.cityname+'\')">'+ data +'</a>'; } return data; }, resellerwindow : function (cityname) { // render the grid to the specified div in the page //

Something wrong with my XML?

天大地大妈咪最大 提交于 2019-12-13 03:39:46
问题 i'm parsing an xml with my extjs but it returns only one of the five components. only the first one of the five components. Ext.regModel('Card', { fields: ['investor'] }); var store = new Ext.data.Store({ model: 'Card', proxy: { type: 'ajax', url: 'xmlformat.xml', reader: { type: 'xml', record: 'investors' } }, listeners: { single: true, datachanged: function(){ Ext.getBody().unmask(); var items = []; store.each(function(rec){ alert(rec.get('investor')); }); and my xml file is: <?xml version=

How implement regex for a textfield to allow one comma one space at a time in Extjs

Deadly 提交于 2019-12-13 03:25:47
问题 I am working on a textfield to make it allow only numbers with max one comma and one space(max) at any occurrence. It can accept value like "5,8", "5 ,8" and "5 , 8". It should not allow two or more spaces or commas at a time. I have tried below code but its not working. this.regex = new RegExp('^\\d+(?\s\\d+)?(?:,\\d*(?\s\\d+)?)*$'); 回答1: This is quite a simple solution. In order to accept possible characters you can use ? , which signifies exactly 0 or exactly 1 occurrence of the preceding

Ext JS SortType treecolumn

房东的猫 提交于 2019-12-13 03:04:40
问题 Using ExtJS 4.2.3. Have form with treecolumn xtype field which contains string value with number in begin. Column has 3 lvls of structure. On first lvl sort needs to be in order like (2, 3, 5, 40, 100 and etc). After picking third lvl value in selection form, value in box will look like: 3.ABC.<BR>3.23.ABCCDD.<BR>3.23.5. ABCC Sample of code: enter Picker = new Project.Picker({ title: "Title1", proxyCfg: { url: Ext.state.Manager.get("url") + "TreeList", type: "ajax"}, idProperty: "id",