FAQ Database Discussion Community


Minifying an existing ExtJS app with Sencha CMD

javascript,extjs,extjs4,sencha-cmd
Im looking for a way to minify my extjs app. The app has already (and will have more) 100+ files like views etc which are loading on the launch and I heard that using a Sencha CMD to minify it would be a good idea, when the app will finally...

Testing Sencha-Cmd using Jasmine

unit-testing,extjs,extjs4,extjs5,sencha-cmd
I have found several links to test Sencha-cmd app but none of them is working for me. Jasmine with Extjs For Unit Tetsing Step Guide for Unit Testing ExtJS Application But none of them is working. Is there any good workinf example for Sencha-Cmd application. Kindly help.

Difference between Class.override() vs Ext.define('Class', override: 'Class' … to create an override [duplicate]

javascript,extjs,extjs4
This question already has an answer here: Best practice for overriding classes / properties in ExtJS? 1 answer What's the difference between these 2 override So option 1: Ext.window.Window.override({ initComponent: function () { this.draggable = false; this.resizable = false; this.on('resize', function () { this.center(); }); this.callParent(); } }); option...

EXTJS - AJAX - redirect to URL without using location.href

javascript,extjs4
In my code, I have to redirect to a vendors SSO page via location.href …problem is that I cannot tell if the redirect was successful or not due to no callbacks in location.href. So, I choose to use AJAX GET instead, based on a 200 or a 401 response I...

How to best handle multiple related templates in Ext JS?

javascript,extjs,extjs4,extjs4.2
I am trying to make a panel to display some data I get from an API. I have decided that XTemplates are probably the best way of handling this. However, I would like the panel to be well organized and flexible like other ext.js elements. So what I came up...

How to change value of “disableSelection” of a grid in Ext js 4.0 dynamically?

javascript,extjs,extjs4
I have the grid coded in Ext js 4.0. Below is the code: var xxx=Ext.create('Ext.grid.GridPanel', { title: 'tableId', id : 'tableId', disableSelection:true, //remaining code } I want to change the value of "disableSelection" dynamically outside the grid according to two different conditions. How can I do this?...

Extjs create form items with json store

json,extjs,extjs4,extjs-mvc
I have created a form panel view and I will create some form items iside this panel. The communication to the store, controller and model works fine but how can I create the items in the view? Json array (retrieved from external service): { "data": [ { "name": "ff", "xtype":...

EXTJS 4.2 - ComboBox - How to Encode input text

extjs,combobox,extjs4,sencha-architect
My memory store proxy has encoded data. Does anymore know how user input typed into a combobox can be encoded to search against the memory proxy store. The combobox uses typeahead and is editable. My understanding is that typed user input into a combobox is handled as a string. Fiddle...

Enable drag and drop of a row just if dragging is done on a specific column

extjs,extjs4,extjs5
I enabled drag and drop of a row on my grid by adding the following code to configuration parameters: viewConfig: { plugins: { ptype: 'gridviewdragdrop', dragGroup: 'firstGridDDGroup', dropGroup: 'firstGridDDGroup' } } It works, anyway I'd like for the dragging to happen just if the user does it by dragging an...

Extjs : Validation for Integers

validation,extjs,extjs4,extjs4.1
I want to add a field which can take only integers and not decimal number. I tried with numberfield as { xtype : 'numberfield', fieldLabel : 'number', } i don't want to make it uneditable is there any way to do it....

ExtJs4 Change Field color on Statuscode

extjs,grid,extjs4,field,cell
Hello im struggling with ExtJs im Trying to change color in ExtJs grid where cell name is 'statuscode' if statuscode is 1 the cell has to change color in green! anybody an idea? Thanks Ext.define('Shopware.apps.ArticleUpdateLog.model.ArticleUpdateLog', { extend: 'Shopware.data.Model', configure: function () { return { controller: 'ArticleUpdateLog' }; }, fields: [...

Want to update other column field values based on the new edited value on my grid rally

extjs,extjs4,rally
I have a application which shows grid When I edit a one field(salary), I want to update other column field values like cost based on the new edited value for salary. So cost will be calculated as salary divided by no. of developers(Count) I tried to do that, but not...

ExtJS5 Menu panel disappears when panel lose focus

javascript,extjs,extjs4
when i run this code , it will generate a menu panel, but in ExtJS 5.1 the menu panel will disappears when once you click the menu item and then click anywhere else. is that a ExtJS 5.1's bug ? ExtJS 5.0 and ExtJS 4.x are work fine. Ext.application({ name...

How to change url of Ext.window.Window in ExtJs

extjs,extjs4,extjs4.1,extjs4.2,extjs-mvc
I am creating model dialog using ExtJS. Below is the Code for it, var win; Ext.application({ name : 'Fiddle', launch : function() { var button = Ext.get('copy_button'); button.on('click', function(){ win = Ext.create('Ext.window.Window', { title: 'Copy Existing', height: 400, width: 500, layout: 'fit', modal: true, loader: { url: '<%= request.getContextPath() %>/demo/copy.action',...

Use different events for same selector in EXTJS

extjs,extjs4,listener
On a grid I need to listen on itemclick and itemkeydown actions, but when I add both of them in my controller then none of them are fired. What is the problem in this code? How can I listen to keypress event on grid's combobox editor? http://jsfiddle.net/WRXcw/3/ 'definitiontypeform dtpropertylist': {...

Want to display all portfolioitem/program in the rallycombobox, but it don't show

extjs,extjs4,rally
Want to display all portfolioitem/program in the rallycombobox, but it doesn't show up any this.down('#filter_box').add({ xtype: 'rallyfieldvaluecombobox', model: 'portfolioitem/program', field: 'Name', //margin: '0 0 5 0', autoLoad: true, fieldLabel: 'Program', itemId: 'program', multiple: true, stateful: true, stateId: 'chart-state1', stateEvents: ['change', 'select'], displayField: 'Name', valueField: 'FormattedID', listeners:{ ready: function(combobox){ this.programs =...

Extjs: Sort store based on array order

arrays,sorting,extjs,extjs4
How can I sort my store based on another array. My array items are myArray = ["10", "3", "15", "7", "1"] Items in the store have this order already as below. My model has a idParent field which its values are in myArray and I want to sort it based...

Cannot read property 'removeCls' of null for tagfield in ExtJS 5

javascript,extjs,extjs4,extjs5
I'm upgrading my ExtJs application form 4 to 5.1 . Initially I was using boxselect component from UX, but in ExtJS 5.1 this component come in core Ext directory. So I removed boxselect and replaced with tagfield as said in up gradation guide. But after doing this I start getting...

Increase ExtJS TabBar scrolling speed within TabPanel

extjs,extjs4,tabpanel
I have a ExtJS tabpanel with lots of tabs. The current scrolling speed to scroll the tabpanel's title bar is very slow. Is there any way to increase the speed? When I made the following modification directly to ext-all-debug.js, the speed increased Ext.define('Ext.layout.container.boxOverflow.Scroller', { //The number of pixels to scroll...

Using script in an external html in Extjs

javascript,jquery,html,extjs,extjs4
I have an external html within a Panel in Extjs. But the scripts which are defined with script tags in my html are not loaded; thus therefore my html does not work properly. var test = Ext.create('Ext.panel.Panel', { title : 'Example 1', width : 250, height : 250, frame :...

ExtJS 4 Cannot render values in combo inside grid (cell editor plugin)

javascript,extjs,combobox,extjs4
I've been implementing some user interfaces for a while using Sencha ExtJS 4.2, I managed to do almost everything, but I'm facing some issues when trying to use a grid with a "cell editor" which is handled by a "combo box". The data object I'm using to display information in...

Why does TreeStore.sync() not write to database?

php,extjs4,shopware
I've been assigned a task to extent and modify a Shopware plugin. The original author isn't in the company anymore. Before that I've never dealt with Shopware and ExtJs. So I spend the last couple of days getting myself into it and I think I understood the principles and paradigm...

Returning string as json in extJs

extjs,extjs4,extjs3
I am working on extJs 3.2.x I have a simple function which returns a string. public Object getRevenueCurrency(....) { return "USD"; } I have Jackson mapper to map the response type to JSON. <bean name="jsonView" class="org.springframework.web.servlet.view.json.MappingJacksonJsonView"> <property name="contentType"> <!-- <value>application/json</value> --> <value>text/html</value> </property> </bean> An attempt to retrieve the data...

How do I render a label in extjs?

extjs,extjs4
I would like to render my label. Something very simple like below : xtype: 'label', text: 'Hi There', renderer : function(val) { return '<b>' + val + '</b>'; }, I would not like to use a cls and a CSS file because I think that is overkill for what I...

Angular does not recognize the dynamically loaded page in Extjs

javascript,angularjs,extjs,extjs4,angularjs-scope
I have a SPA in Extjs system. I have also included angular and the necessary modules which i want to use on a page (external html referred in a panel of extjs). Angular is defined in and working everywhere except in newly loaded page.The problem is that i have to...

ExtJS Store proxy incorrectly build GET request with array in extraParams

php,extjs,get,extjs4
I want to pass additional filter data to my PHP REST service, namely a set of values from a form. Form is a set of checkboxes with a same name: 'relations'. To do this, I do the following: var relationTypes = [], objectsTreeStore = Ext.getCmp('objectsTreeGrid').getStore(); if( 'relations' in this.getFilterForm().getValues() )...

Populate store in ExtJS using hasMany associations

javascript,extjs,extjs4,has-many,gridpanel
I am trying to populate all the records at once in a model and then assign each collective property to different container. i.e. I have 1 grid and 1 combo on my page and trying both in one call. So I fetch the data successfully but it comes in forms...

Regular Expression for prompt of Ext.MessageBox

extjs,extjs4,extjs4.1,extjs4.2,extjs3
i prompt the user to fill the combination of alphabets and number. Here is the code: Ext.Msg.show({ title : 'you can enter alphabets and number', msg : 'Your value', buttons: Ext.Msg.OKCANCEL, scope : this, prompt:true }); Although it prompt to fill the value, but in that field i want to...

change listener doesnt work in extjs

extjs,extjs4,listener
I have a dynamic form and i want to add a listener when change a field value, but i couldnt achive to do that. I added a click listener but when i change it to the change it doesnt work. thanks in advance. here is the code below : panel...

Extjs itemId in class definition

javascript,extjs,extjs4
Is it a bad practice to have the itemId configuration on the class definition (instead of instantiation)? Is there some official documentation that backs it up or is it just a matter of opinion? Or maybe there is some logic that I'm missing that makes it evident that this is...

Should we need two servers to run ext js application with node.js at server side

javascript,node.js,extjs,extjs4
I am new to Node.js , I have downloaded a sample application where server side was written in Node. I am building and running my Ext js application using sencha cmd at localhost:1841.At the same time I am running server.js in node(Express server) at port 3000. And the application is...

ExtJs standard form submit with jsonData for file download

extjs,asp.net-web-api,extjs4
I'm trying to download a file from WebApi using ExtJs 4.2.3. After reading Extjs 4 downloading a file through ajax call, it looks like my best bet is to use the standard form.submit, however, my data is not passing as expected to the WebApi controller - using the below code,...

Disable editing on combobox but still allowing search:possible?

extjs,extjs4,extjs5
I don't want to allow my user to freely write everything they please on the combobox, and I know that with: editable: false I can make this component not editable. However, this disables the useful search function as well! User should be still allowed to freely write in the combo...

ie8 Object doesn't support this for extjs code

javascript,angularjs,extjs,backbone.js,extjs4
i am getting the following error: "Object doesn't support this property or method" in ie8 in chrome its fine when i debug ext js code in ie8 its shows undefined for region.getWorld(); but where as when I see it in chrome browser I am getting the values providing my...

How to get a segmented button in ExtJS 4.1.1?

button,extjs,extjs4,radio-button
In ExtJS 5, there is a segmented button (Ext.button.Segmented). How do I get a similar functionality in ExtJS 4.1.1. I am trying to replace my radio buttons with segmented button. Thanks in Advance....

ExtJS: Next method executes even before Ext.Ajax.request completes

extjs4
Below is one function defined in my Extjs code. updateJob : function(button,grid, record) { var activeAccordianName = _myAppGlobal.getController('RFBAccordiansController').getActiveAccordianName(); if(activeAccordianName == 'Lookup') { var win = button.up('window'), form = win.down('form'), record = form.getRecord(), values = form.getValues(); var oldRecord = new Object(); oldRecord.environment=record.get('environment'); ......... .......... win.close(); this.submitLookupJobUpdateForm(oldRecord,values); record.set(values); } }, Everything...

Where is the bug in my recursive JSON parser?

javascript,json,extjs,recursion,extjs4
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...

Is there a way to rename, in a model, the automatically generated “id” property?

extjs,extjs4,extjs5
I have a grid which I populate by adding items to the store or by receiving already existing items by a server. This is what happens: 1-users adds new items to the grid by gui. 2-users can send new items to the server by pressing a "send" button. Each item...

Aceess extjs viewmodel store in view

extjs,extjs4,extjs-mvc,extjs5
How do I access and set store defined inside the viewmodel? I could able to set store created outside the viewmodel. But I want to keep the store inside the viewmodel and set that store in view for the grid. View Ext.define('MyApp.view.sample.Sample', { extend: 'Ext.panel.Panel', requires: [ 'MyApp.view.sample.SampleController', 'MyApp.view.sample.SampleModel' ],...

ExtJS 5 - Download file from POST servlet request

javascript,extjs,extjs4,ria,extjs5
I have trying to implement the export functionality in ExtJS 5 using form submit method. And I had look at the following stackoverflow link, it helps but not fully. Extjs 4 downloading a file returned from a post request In my case i facing an issue after the request response...

Can I use sencha extjs stores and models for sencha touch?

javascript,extjs,extjs4,sencha-touch
Can I use sencha extjs stores and models for sencha touch? I am trying to create a mobile application using sencha touch. I already have the application created with sencha extjs, but want to know if generally the stores and models from my extjs application will work for the sencha...

ExtJS: insert value to added columns in a grid

extjs,gridview,extjs4,store
I have a grid panel with 3 columns ['name', 'email', 'phone'], and it's model has 5 fields ['name', 'email', 'phone','property','value']. What I'm looking for is to insert columns to the grid panel dynamically based on number of items in 'property' field and their values from 'value' field. The sample code...

How to find nth child nodes in ExtJS 4.1 tree panel

extjs,extjs4,extjs4.1,extjs4.2
Please check the following fiddle. I have a node named Grand Parent, this node has two child: Child Node & Child Two. When user clicks on Grand Parent node, I want to go down till the last node in the hierarchy and update one of the property in each node....

In ExtJS, how do you set the background color of a row in a Ext.grid.EditorGridPanel

javascript,extjs,extjs4
I have an ExtJS web application in which I need to set the colors for the rows of an Ext.grid.EditorGridPanel. What I need to do is to set the color based on the value of one of the fields in the row. It seems like this should be pretty easy...

How to create an Ext.data.Model from a generic object?

javascript,extjs,extjs4
I want to create a real Ext.data.Model record that could be loaded later into a form from values held in an object. Is this possible ? The issue is that I have a grid which holds actual Ext.data.Model objects, that I load into a form, but some logic in my...