extjs

extjs 6.0 sencha cmd to compile only my javascript code

只谈情不闲聊 提交于 2019-12-20 06:40:50
问题 I use sencha extjs 6.0 ,and it always compile all extjs code to single one file .What I need is that : 1 the need extjs is compiled to one single file ,I know which packages are needed ,so it can be static and not need to change . 2 then sencha cmd compile my own javascript file to one single file ,so I can update to web server and let client download it less size file .Because the extjs file size is large than 600K with compression . Anyone have idea how to do it? 回答1: Go into .sencha/app

Load the store of one dropdown on change of value in another dropdown

这一生的挚爱 提交于 2019-12-20 06:34:27
问题 I have 2 dropdowns. Based on the value selected in one dropdown, I need to make AJAX call using JSON to retrive the values and make available in other dropdown. This needs to be done in EXTJS. I tried the following code: FUNCTION_NAME_Field.on('select', function() { AGENT_NAME_Field.reset(); agentNameStore.proxy= new Ext.data.HttpProxy({url: '/omsWeb/navigation/getAgent.htm?id='+FUNCTION_NAME_Field.getValue()}); agentNameStore.load(); }); Here FUNCTION_NAME_Field is the first dropdown.

How to load grid data with json data on ajax sucess

梦想的初衷 提交于 2019-12-20 06:28:13
问题 In my ajax sucess i am calling this funcction and there from response I am extracting the data which I need to load. success: function(response){ StoreloadData(this,response); }, In StoreloadData function i am trying to load data in my grid like this but not getting data. StoreloadData(me,response){ var myGrid = Ext.getCmp('#myGrid'); var myGridStore = myGrid.getStore(); var gridData = response.myData.data; var total = gridData[0].recordsCount; myGridStore.load(gridData); // Not loading

Dynamically generate axis and series in Extjs 4

六月ゝ 毕业季﹏ 提交于 2019-12-20 05:45:09
问题 I want to generate Y axis dynamically based on json response. for example : { "totalCount":"4", "data":[ {"asOfDate":"12-JAN-14","eventA":"575","eventB":"16","eventC":"13",...}, {"asOfDate":"13-JAN-14","eventA":"234","eventB":"46","eventC":"23",...}, ...and many more. ] } And I want to generate line chart of date vs event . Date is on x-axis and eventA,eventB,...so on should be on Y-axis. So far I tried this : var fieldsForChart = ['eventA','eventB',...]; //This is hard coded. Ext.define(

How to validate a field using cq.HTTP.post method In adobe cq5?

微笑、不失礼 提交于 2019-12-20 05:39:19
问题 I am trying to validate a field by sending field value to a servlet and in response i'm getting true or false i.e whether this field is valid or not . here is my dialog file <bodytext jcr:primaryType="cq:Widget" fieldDescription="Type Text Here" fieldLabel="Body Text" name="./bodytext" validator= "function(value) { var dialog = this.findParentByType('dialog'); var postParams = {}; postParams['value'] = value; CQ.HTTP.post('/bin/feeds/validation.json', function(options, success, response)

Best practices for initializing and deconstructing controllers

∥☆過路亽.° 提交于 2019-12-20 03:17:44
问题 When building an application what is the best way to setup your controllers? I understand that routing, event listeners, and most all interactivity should be managed by the controllers, but my main controller is starting to grow out of control and I'm not sure how to best separate my logic into separate controllers without keeping them all "running" all the time... 回答1: It's okay to have them all loaded at app start-up, even with hundreds thousands of controllers. It's the view rendering that

how to get Extjs 4 store's request data on beforeload event?

左心房为你撑大大i 提交于 2019-12-20 02:56:41
问题 I'm trying to get request data params beforeload event on store. I can see the operation object contains the request data but I can't seems to get it from operation object Ext.create('Ext.data.Store', { autoLoad : true, fields : [ {name: 'item_code', type: 'string'}, {name: 'quantity', type: 'int'}, {name: 'description', type: 'string'} ], storeId : 'summary', proxy : { type : 'ajax', actionMethods : 'POST', extraParams : {'filter': 'branch', 'branch': location }, url : 'reports/stock_summary

metachange event is not fired

落爺英雄遲暮 提交于 2019-12-20 02:56:26
问题 I have a store, which looks like this: Ext.define('GridGeneral.store.GridGeneralStore',{ extend:'Ext.data.Store', model:'GridGeneral.model.GridGeneralModel', autoLoad:true, proxy:{ type:'ajax', url:'/api/grid/gridgeneralstore.php', reader:{ type:'json' } } }); Inside a controller I want to fire `metachange' event. I try to do it like this: init:function(){ Ext.getStore('GridGeneralStore').addListener('metachange',this.metaChanged, this); //^^^not fired Ext.getStore('GridGeneralStore')

Treepanel with nested data from JSON

主宰稳场 提交于 2019-12-20 02:52:21
问题 I want to add nested data from JSON into a treepanel. My problem is that the tree is being listed for the number of JSON records (number of divisions, here 1 in the example) without any text. But when I select a child, it shows Uncaught TypeError: Cannot read property 'internalId' of undefined error. This is what I have tried so far. JSON file (schemesInfo.json). { "divisions":[ {"name": "division1","id": "div1","subdivisions":[ {"name": "Sub1Div1","id": "div1sub1","schemes":[ {"name":

Storing JSON data in browser memory

走远了吗. 提交于 2019-12-19 16:52:19
问题 I want to persist some JSON information in browser. Depending on user interaction with the application, I want to store 5-6 different JSON object into memory. What options I have to achieve this? Please suggest any library or plugin using which I can persist information in the browser. Thanks 回答1: To add to the solutions given, I'd also want to add a reference link Storing Objects in HTML5 localStorage where this question is discussed nicely. Below is the code var testObject = { 'one': 1,