extjs4

Grid Panel Scrollbars in Extjs 4 not working

独自空忆成欢 提交于 2019-12-20 10:58:24
问题 var gusersPanel = Ext.create('Ext.grid.Panel', { flex:1, columns: [{ header: 'User Login', dataIndex: 'user_login', width:150 },{ header: 'User Name', dataIndex: 'user_nicename', width:150 },{ header:'Privledge', dataIndex:'admin', width:150 }], autoScroll: true, layout:'fit', selModel: gusersSel, store: gusersStore }) Hi I am using above code for the grid Panel in Extjs4.0.2a When I populate data dynamically in the store the scrollbars are not working . I have also tried using doLayout() for

ExtJS - How to use Proxy, Model? How are they related?

百般思念 提交于 2019-12-20 09:24:05
问题 I've been trying to learn to work with Models and Stores. But the proxy bit is confusing me a lot. So I'm going to list out my understanding here - please point out the gaps in my understanding. My understanding Models are used to represent domain objects. Models can be created by ModelManager, or by simply using the constructor Models are saved in Stores Stores may be in memory stores, or can be server stores. This is configured using Proxy. Proxy tells the store how to talk to a backing

ExtJS - How to use Proxy, Model? How are they related?

淺唱寂寞╮ 提交于 2019-12-20 09:21:05
问题 I've been trying to learn to work with Models and Stores. But the proxy bit is confusing me a lot. So I'm going to list out my understanding here - please point out the gaps in my understanding. My understanding Models are used to represent domain objects. Models can be created by ModelManager, or by simply using the constructor Models are saved in Stores Stores may be in memory stores, or can be server stores. This is configured using Proxy. Proxy tells the store how to talk to a backing

How to assign Store value to hidden field

杀马特。学长 韩版系。学妹 提交于 2019-12-20 05:44:06
问题 I have a model and store and I need to assign a value to the hidden field from the store. Ext.define('loginUser', { extend: 'Ext.data.Model', fields: [ { name: 'id', mapping: 'Provider.id' }, { name: 'name', mapping: 'Provider.name' } ] }); loggedUser = Ext.create('Ext.data.Store', { model: 'loginUser', autoLoad: true, proxy: { type: 'ajax', url : url+'/lochweb/loch/users/getLoggedUser', reader: { type: 'json', root: 'Users' } } }); I need to assign the store value to hidden field as follows,

How to create stackoverflow type buttons?

血红的双手。 提交于 2019-12-20 03:42:32
问题 I would like to know how to create stack overflow type buttons (buttons like in image below)? Is it possible to create buttons like this using ExtJS? 回答1: Someone made an extension for that awhile ago. It is not exactly like SO buttons but you could play around with the CSS a bit and possibly add a few overrides to get it 100%. I think the fourth example (forceSelection: false) is probably the most similar. Just hide the field box and change the close icon and you're basically there. Here are

How to create stackoverflow type buttons?

耗尽温柔 提交于 2019-12-20 03:42:02
问题 I would like to know how to create stack overflow type buttons (buttons like in image below)? Is it possible to create buttons like this using ExtJS? 回答1: Someone made an extension for that awhile ago. It is not exactly like SO buttons but you could play around with the CSS a bit and possibly add a few overrides to get it 100%. I think the fourth example (forceSelection: false) is probably the most similar. Just hide the field box and change the close icon and you're basically there. Here are

ExtJS4 How to set TreePanels root node from JSON

守給你的承諾、 提交于 2019-12-20 02:57:03
问题 I want to create TreePanel using ExtJS4. So I'm sending JSON to proxy reader which has following format { "text": "en", "children": { "text": "/", "children": [{ "text": "/page", "children": [{ "text": "/page/new", "children": [], "leaf": true, "expanded": false }, { "text": "/page/remove", "children": [], "leaf": true, "expanded": false } ], "leaf": false, "expanded": false }, { "text": "/home", "children": [], "leaf": true, "expanded": false } ], "leaf": false, "expanded": true } } How do I

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

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":

Retain the already present value of the cell for edit on click

瘦欲@ 提交于 2019-12-19 11:20:03
问题 I've a grid cloumn with xtype:datecolumn as below, Now what happens is when i want to alter the value of the cell , i.e change the time on click the cell becomes blank for editing and on clicking way the previous value comes back, I want the value to be present to edit on click this is my gridcolumn { text: ' Time', dataIndex: 'time', xtype: 'datecolumn', format: 'Y-m-d H:i:s', editor: { xtype: 'datefield', format: 'Y-m-d H:i:s', allowBlank: false, maskRe: /[0-9,:,-]/ } }, How will I be