extjs

Ext.Viewport.add is not a function In Ext js

故事扮演 提交于 2019-12-25 04:27:33
问题 I am very new to Ext js . I am trying to implement Grid in application in that once user will click on data new msg window will open with current data and user can edit that and this will saved in model. I am using Classic toolkit I tried like this: Ext.define('MyApp.view.main.MainController', { extend: 'Ext.app.ViewController', alias: 'controller.main', require:['Ext.plugin.Viewport'], itemtap: function (view,index,item,record) { Ext.Viewport.add({ xtype:'formpanel', title:'update', width

Filter a store with array of values from one property with ExtJS

喜夏-厌秋 提交于 2019-12-25 04:22:20
问题 I'm trying to apply a constraint on combobox. It's half-working at the moment. On the combobox, I have this listener: [...] listeners: { 'focus': function (combo, value) { var orgComboVal = Ext.getCmp('Org1') var getOrgValue = orgComboVal.getValue(); if (typeof getOrgValue !== undefined) { reseaulist.clearFilter(true); for (var q = 0, l = getOrgValue.length; q < l; q++) { reseaulist.filter([ {property:'code_organisme', value: getOrgValue[q]} ]); } } } } Ext.getCmp('Org1') defines another

extjs 100% height in hbox

a 夏天 提交于 2019-12-25 04:00:13
问题 I am new in extjs and just stuck on dynamic (percent) height in hbox setting. Sorry i could provide you my code on sencha fiddle, so i simplified my question, here is code Ext.application({ name : 'Fiddle', launch : function() { Ext.create('Ext.Container', { width: "100%", height: 200, title: "HBoxLayout Panel", layout: { type: 'hbox', align: 'stretch' }, renderTo: document.body, items: [{ xtype: 'panel', title: 'Inner Panel One', flex: 2 },{ xtype: 'panel', title: 'Inner Panel Two', flex: 1

AJAX asynch callback working correctly but how do I wait for the returned values

馋奶兔 提交于 2019-12-25 03:54:32
问题 My main EXTJS function is calling three different AJAX asynch functions.The good news is that each AJAX function is successfully returning a boolean callback on whether the AJAX GET call was successful or not. The problem - I need to perform additional post business logic from my main calling function once the boolean results have been returned from all three AJAX functions. But as it is async the code will not wait for the async functions to complete and will fly through. Any ideas on how I

ExtJS String to Combobox

元气小坏坏 提交于 2019-12-25 03:48:28
问题 I have a php file that returns a string like this ["item1","item2","item3","item4"] I need to create a combobox with ExtJS. The options must be the items like 4 options. How would I do this if the php link is items.php . Just to make things clear I need the combobox displayField and valueField have the same values, like the item1 will be the displayField and the valueField . Thanks in advance! P.S. the string is not Json formatted, I guess it's array store. 回答1: Firstly, I think you have to

Ext.Direct File Upload - Form submit of type application/json

[亡魂溺海] 提交于 2019-12-25 03:45:24
问题 I am trying to upload a file through a form submit using Ext.Direct, however Ext.direct is sending my request as type 'application/json' instead of 'multipart/form-data' Here is my form. { xtype: 'form', api: { submit: 'App.api.RemoteModel.Site_Supplicant_readCSV' }, items: [ { xtype: 'filefield', buttonOnly: false, allowBlank: true, buttonText: 'Import CSV' } ], buttons: [ { text: 'Upload', handler: function(){ var form = this.up('form').getForm(); if(form.isValid()){ form.submit({ waitMsg:

Ext.Direct File Upload - Form submit of type application/json

浪尽此生 提交于 2019-12-25 03:45:10
问题 I am trying to upload a file through a form submit using Ext.Direct, however Ext.direct is sending my request as type 'application/json' instead of 'multipart/form-data' Here is my form. { xtype: 'form', api: { submit: 'App.api.RemoteModel.Site_Supplicant_readCSV' }, items: [ { xtype: 'filefield', buttonOnly: false, allowBlank: true, buttonText: 'Import CSV' } ], buttons: [ { text: 'Upload', handler: function(){ var form = this.up('form').getForm(); if(form.isValid()){ form.submit({ waitMsg:

How to add a custom CSS file in ExtJs 5?

我们两清 提交于 2019-12-25 03:44:11
问题 In ExtJs 4, I included a custom css like this: <!-- <x-compile> --> <!-- <x-bootstrap> --> <link rel="stylesheet" href="bootstrap.css"> <script src="ext/ext-dev.js"></script> <script src="bootstrap.js"></script> <!-- </x-bootstrap> --> <script src="app.js"></script> <!-- </x-compile> --> <link rel="stylesheet" href="/custom/css.css" type="text/css" charset="utf-8" /> The fact that the link to the CSS comes after the <x-compile> section makes that it is loaded later and thus rules in custom

How to add a custom CSS file in ExtJs 5?

拟墨画扇 提交于 2019-12-25 03:44:07
问题 In ExtJs 4, I included a custom css like this: <!-- <x-compile> --> <!-- <x-bootstrap> --> <link rel="stylesheet" href="bootstrap.css"> <script src="ext/ext-dev.js"></script> <script src="bootstrap.js"></script> <!-- </x-bootstrap> --> <script src="app.js"></script> <!-- </x-compile> --> <link rel="stylesheet" href="/custom/css.css" type="text/css" charset="utf-8" /> The fact that the link to the CSS comes after the <x-compile> section makes that it is loaded later and thus rules in custom

Where is the bug in my recursive JSON parser?

梦想的初衷 提交于 2019-12-25 03:43:26
问题 I'd like to create a recursive function to parse json-like data as below. When key is xtype, a new class will be created. In particular, when xtype = gridpanel/treepanel, all the properties have to be its constructor argument, otherwise, properties will be added after class has been created. My recursive function as below, I got an error 'too much recursion' at line 21 in ext-all.js. Please take a look, how am I able to solve this problem? codes in main program: me.recursiveParser(null, data