extjs

adjusting json format send by extjs form

旧巷老猫 提交于 2019-12-11 11:39:01
问题 I have a question. I need to send a json format to my backend service. It requires something i haven't managed to create. What i am sending with a form is this: { "jobs": { "name": "dsvs", "jobType": "CUSTOM", "description": "sdvsdv", "tasks": "14,15,16" } } but what i need to send is { "jobs": { "name": "dsvs", "jobType": "CUSTOM", "description": "sdvsdv", "tasks": [14,15,16] } } how can i do this? This is my form handler: handler: function () { var form = this.up('form').getForm(); var

extjs actioncolumn renderer prevents handler

瘦欲@ 提交于 2019-12-11 11:36:26
问题 I have a actioncolumn on my grid with this code: this.columns = [ { xtype: 'actioncolumn', items: [{ icon: '../Content/Images/Approve.png', handler: function (grid, rowIndex, colIndex, node, e, record, rowNode) { alert('test approve') } } ...rest of the columns when I click the icon, I get the "test approve" message, so it works as expected! If I add the render method bellow to disable the action column for rows that are already approved: renderer: function (value, metadata, record) { if

ExtJS paged combo with remote JSON store. Display selected value with paging

六月ゝ 毕业季﹏ 提交于 2019-12-11 11:35:51
问题 I've got an ExtJS combo with remote store, which returns to me data in JSON format. When I select a value on the first page (for example) and then navigate to another page, the combo display selected id, not the value. How can I always display a selected value? Code: Ext.onReady(function() { Ext.define('Model', { extend: 'Ext.data.Model', fields: ['title'], idProperty: 'threadid' }); var store = Ext.create('Ext.data.Store', { pageSize: 50, model: 'Model', remoteSort: true, proxy: { type:

Attempting to load Ext store with JSON data from AJAX request returns error

点点圈 提交于 2019-12-11 11:33:59
问题 Am attempting to load and Ext Store with Ext 4.0.7. It is returning an Object doesn't support this property or method error when i call the loadRawData method on the store in the success callback of the AJAX request. Here is the data i am loading: { "data": [ { "id": 1, "source": "1445261", "target": "1437043", "sourceType": "user", "redirectUrl": "http://www.google.co.uk", "message": "this is a notification message", "targetType": "user", "messageType": "notification", "sentDate":

Extjs Grid panel - Hide a column with hideable=false

只愿长相守 提交于 2019-12-11 11:14:17
问题 i'm using Extjs 4.1 grid panel. i'm looking for a way to hide a column from the grid. i can use setHidden but then the user can "unhide" the column again from the menu in the column header. it seems that the hideable propery just doesnt cut it... 回答1: Ok. Eventually i did this: in the grid's "afterrender" event: var header = pnl.down("headercontainer"); if(header != null && header["getMenu"] != null) { var menu=header.getMenu(); menu.on('beforeshow',function(sender,eOpts){ var menu=sender; if

How to Bind dataIndex to Select All check box

情到浓时终转凉″ 提交于 2019-12-11 11:11:39
问题 I am trying to bind checkbox field to gird with select all options - xtype: 'grid', store: { type: 'webapi', api: { read: 'api/Report/GetIfo' }, autoLoad: true, }, columns: [ { header: 'Name', dataIndex: 'first_name'} ], selModel: { selType: 'checkboxmodel', //dataIndex:'flag', //showHeaderCheckbox: true } I am trying to bind the dataIndex to it so that when grid is loaded, respective checkbox will be selected. I tried by using selModel: { selType: 'checkboxmodel', //dataIndex:'flag', /

Extjs + jQuery together

泪湿孤枕 提交于 2019-12-11 11:05:39
问题 How to use Ext.onReady function and jQuery together ? I have used ext js for generating tree and I want to use jQuery for validation of some textfield values. Or any other way to validate textfield using extjs? 回答1: Ext has built-in validation via textfield configs for some things (e.g. allowBlank: false ) and validator functions for others (all of the VTypes functions), and also hooks for providing custom validation. Not sure why you'd need to add jQuery just for that, maybe you can be more

Event driven programming in Ext JS

杀马特。学长 韩版系。学妹 提交于 2019-12-11 10:58:03
问题 I'm working on an application where different widgets from different plugins would be loaded into a host, and they don't know of each other. So I want to use EDP and in one widget raise an event (for example, UserDeleted) and in another widget, subscribe to that event (the famous publisher/subscriber, or let's get more specific, observer pattern). In jQuery I use trigger() and bind() methods to accomplish this. However, I'm not able to find anything equivalent in Ext JS. Am I missing

Creating a specific Sublime Text's snippet, using Regular Expressions

徘徊边缘 提交于 2019-12-11 10:57:25
问题 Context I have a process that envolves creating similar file/filename structures that have inside of it the name of itself, and things like that, i do this every day, and i see that is repetitive and have a pattern, then i got the idea of creating a Sublime Text's Snippet to generate the code for me, adding a significant improvement on my performance. Example There is a example of a complete "model" using the structure that i said: Ext.define('App.model.geral.layouts.Layouts', { extend: 'App

Preparing a multi-dimensional array for an ExtJS tree control

荒凉一梦 提交于 2019-12-11 10:56:35
问题 please dont close this question as repeated one.......... I am new to php. I am developing one tree grid in extjs.were i need to display field in tree format.so for front end i need to send the encoded data. I want 2 functions for encoding and decoding a string variable,multidimensional array,variables with a set of delimiters. For example if i am having an array......... array( array( "task" => "rose", "duration" => 1.25, "user" => 15 ), array( "task" => "daisy", "duration" => 0.75, "user" =