extjs

Ext.bind does not see function in ExtJS

寵の児 提交于 2019-12-13 02:59:11
问题 I am trying to mod the Portlet example and port it into our program. The code looks like this: Ext.create('Ext.container.Viewport',{ id: 'app-viewport', //creates viewport layout: { type: 'border', padding: '0 5 5 5' // pad the layout from the window edges }, onPortletClose: function(portlet) { this.showMsg('"' + portlet.title + '" was removed'); }, showMsg: function(msg) { var el = Ext.get('app-msg'), msgId = Ext.id(); this.msgId = msgId; el.update(msg).show(); Ext.defer(this.clearMsg, 3000,

Ext JS - nested Xtemplates

送分小仙女□ 提交于 2019-12-13 02:24:36
问题 I am new to ExtJS development. I have data from 2 different data stores (ex: DepartmentsStore and EmployeesStore). I am trying to show up list of departments in a parent table and display all employees within each department as a nested table into the parent Department table on UI. I used XTemplates to load the data and bind it to my main panel. However I am having issues in nesting XTemplates. I am not sure if I am doing something wrong, any help is greatly appreciated. Here is the Xtemplate

adding new button “Save and Next” apart from Update and Cancel given in the editable grid of extjs

馋奶兔 提交于 2019-12-13 02:23:12
问题 Please help. I am using extjs. Currently my editable grid has two buttons (" Update " and " Cancel ") I need to add new button " Save and Next " (Saves the current row and makes next row editable) in the editable grid. Can someone please help me achieve this. 回答1: if you don't mind to get your hands dirty and override ExtJS code of the RowEditorButtons. look at the constructor and use Ext.define with override to add another button. Here is a working example: Ext.define('CompanyName.grid

Cyrillic characters in MessageBox class of Sencha Touch

久未见 提交于 2019-12-13 02:15:50
问题 I am working with different languages with the Sencha Touch framework, and translating MessageBox buttons to different languages, I have added it and it is working but with the russian I am having problems, instead of appears the correct translation appears "???" doesn´t detect correctly the translation with special characters. Any clue? 回答1: Yes, I am working with UTF8 charset, but I have solved this issue receiving the labels from the backend here the code: var language = 'RU', //sent from

Sencha Touch 2: belongsTo association callback usage?

百般思念 提交于 2019-12-13 02:11:31
问题 I call a belongsTo assocation generated getter function: token.getUser({ callback: function(user, operation) { console.info('getUser callback'); Ext.Viewport.unmask(); console.dir(operation); }, failure: function(user, operation) { console.info('getUser failure'); }, success: function(user) { console.info('getUser success'); } }); My console shows the following: getUser success Auth.js:74 getUser failure Auth.js:69 getUser callback Auth.js:64 undefined Can someone please enlighten me how this

Sencha architect, I have a form and how to config its `reader`?

心不动则不痛 提交于 2019-12-13 02:07:20
问题 Sencha architect, I have a form and I want to config its reader like this, Ext.create('Ext.data.JsonReader', { root : "rows", model : 'city' }) In Sencha architect, it will be add a pair of single quote mark. So how to config reader of the form ? 回答1: Ron, The Form Panel has a reader config that is set to be an object. Edit that object and add the code bellow to it: { type : 'json', root : 'rows', // if ExtJS 5, this should be rootProperty: 'rows' model : 'city' } Shoud look something like

How to tell store what page was loaded

落花浮王杯 提交于 2019-12-13 02:02:13
问题 I have a store that is binded to grid. When it is loaded it has n pages. Now I want to show the page that contains certain value. In order to do that I use store.load({params: {'file': 'file33939'}}); (the 'file' is used because grid shows list of files, but it's irrelevant to question). At this moment I don't know what the page it should be. The response looks like: { "files":[{"id":"33939", "name": "file33939"}, /* ... */], "total": 1000, "page": 13 } Grid displays correct data (the page

Search for CSS(Sencha Touch) tutorials

倾然丶 夕夏残阳落幕 提交于 2019-12-13 01:23:16
问题 I want to change the layout of my app. I want use my own buttons and change background color. Can someone post some useful tutorials. I'm not so good in css thanks for help 回答1: My only advice is for you to use Firebug if you want to customize you app. Set cls attributes to your components, launch the app on a Firefox/Chrome/Safari and then just right click on the HTML element you want to customize and take a look at the CSS set for the element. Then, it's all about CSS writing. 回答2: Either

Need to change the background color of icon inside extjs grid action column

喜你入骨 提交于 2019-12-13 01:18:18
问题 I need to change the background color of icon inside extjs grid action column on clicking that icon. handler: function(grid, rowIndex, colIndex) { //Need to change the background color of the delete icon } http://jsfiddle.net/mohansee/6afxy/2/ 回答1: this will do it: handler: function(grid, rowIndex, colIndex) { Ext.query('td.x-action-col-cell img',grid.getNode(rowIndex))[0].style.setProperty('background-color','#000') } 来源: https://stackoverflow.com/questions/23122820/need-to-change-the

Grid inside Tab

三世轮回 提交于 2019-12-13 01:02:59
问题 I'm trying to put a Grid (Ext.grid.GridPanel) object inside a Tab . This is the code: var grid = new Ext.grid.GridPanel({ store: new Ext.data.Store({ autoDestroy: true, reader: reader, data: xg.dummyData }), colModel: new Ext.grid.ColumnModel({ defaults: { width: 120, sortable: true }, columns: [ {id: 'company', header: 'Company', width: 200, sortable: true, dataIndex: 'company'}, {header: 'Price', renderer: Ext.util.Format.usMoney, dataIndex: 'price'}, {header: 'Change', dataIndex: 'change'}