extjs-mvc

Extjs 4 Session Management

我只是一个虾纸丫 提交于 2019-12-11 10:56:26
问题 I am having web based application in which user session has to be managed management. In app.js I have used launch config as : launch: function(){ Ext.create('myproject.view.LoginForm') } LoginForm : will show log in dialog and invoke login controller for communicating with server for authenticating the credentials provided by the user. So when ever user refreshes the page Extjs is asking for log in that is because of I am not checking the session in here, How should be the session details

Sencha Touch store 'aftersync'-like event

喜夏-厌秋 提交于 2019-12-11 03:34:56
问题 I'm using a ListView with a store/ajax-proxy/json-reader/json-writer. I'd like to set the ListView to loading before I call store.sync() , and remove the loading once the response got back from the server. Problem is, I don't know where I could hook in my call to be processed once the request is done, as all I'm doing is calling sync() . Store has a beforesync event, what I'd like is something like aftersync . Any ideas how to accomplish that? 回答1: By reading the Sencha Touch source code, it

subarray models mapping issues with gridpanel extjs 4

人盡茶涼 提交于 2019-12-10 12:05:53
问题 stackoverflow team member I am having problem with displaying the json subarray data to my gridpanel my json data is below { "total": 11, "success": true, "employeetaskdetdata": [{ "subject": "Work in progress", "employee": { "username": "yogen", "designation": { "department": { "company": { "cmpname": "Kintu Designs Pvt ltd", "cmptitle": "Kintu Designs Pvt ltd", "cmpdesc": "<b>D-104 Toral Appartment Surat,<br>Timalyabad.</b>", "cmpfax": "8128812153", "cmpcontact": "8128812153", "cmpwebsite":

How to catch tree node clicks from a (MVC) controller in ExtJs 4?

若如初见. 提交于 2019-12-10 11:55:08
问题 In my ExtJS 4 controllers I can catch events on certain elements on the page. For example, to catche menu items clicks I can do: init: function() { this.control({ 'maintoolbar menuitem[action=contacts]': { click: function() { // do something ; } } })....... How do I do the same to catch tree node clicks? I pretty much want the same effect as the menu item (the tree has the id of settingstree). EDIT: here's the tree code: Ext.define('MyApp.view.system.SettingsTree',{ extend: 'Ext.tree.Panel',

How to tackle ExtJS “Synchronously loading” warning

为君一笑 提交于 2019-12-09 12:06:39
问题 When using ExtJS 4+ with asynchronous loading one would be familiar with this sort of warning: [Ext.Loader] Synchronously loading 'MY.particular.module'; consider adding Ext.require('MY.particular.module') above Ext.onReady How to identify which JavaScript module (be it a controller, a component, etc) is causing this warning? I.e. the place where include module being synchronously loaded in the requires list. What is the right way to go around correcting these warnings? Does an automated way

How to perform View-Controller separation when using an “actioncolumn” (Ext.grid.column.Action)

大城市里の小女人 提交于 2019-12-09 06:15:47
问题 In ExtJS 4, I have a grid that contains an action column. Whenever that action is triggered, I want to execute "my action". Without MVC, this would look like this: /* ... */ { xtype: 'gridpanel', columns: [ /* ... */ { xtype: 'actioncolumn', items: [{ handler: function(grid, rowIndex, colIndex) { // my action } }] } ] } Now I want to introduce the View-Controller separation. So I have to move the handler from the View to the Controller. But how does the controller register its method to the

Always show the tip text of Slider in Extjs

只谈情不闲聊 提交于 2019-12-08 16:54:07
问题 In Extjs 4.1.1a, How to keep the tip text of the slider always visible? Currently, the tip text is being visible whenever the user drags the bar of the slider. I searched on docs but couldn't find any related concepts. If it is not documented or not possible , then please explain me how to create the tip text manually. The tip text should move along the bar of the slider and it should not overcome or hide any other adjacent components. Here is my code which generates a simple slider: xtype:

Firing application wide events from button handlers

…衆ロ難τιáo~ 提交于 2019-12-08 14:16:01
问题 I have this gridPanel: Ext.define('BM.view.test.MacroList', { extend: 'BM.view.GridPanel', alias:'widget.macro-test-list', store: 'Tests', initComponent: function() { this.columns = [ { xtype:'actioncolumn', width:50, items: [ { icon: 'images/start.png', tooltip: 'Start Test', handler: function(grid, rowIndex, colIndex) { this.application.fireEvent('testStart', grid.getStore().getAt(rowIndex)); // application not defined here because 'this' is the button. }] }] } } stratTest is a function

Create table like structure using Extjs

爱⌒轻易说出口 提交于 2019-12-08 08:34:56
问题 In Extjs 4.1.1a, I am trying to create a table like structure using containers or panels which completely stretches horizontally and vertically to its parent component. Here is the Example Fiddle In View : Ext.define("MyApp.view.Main", { extend: 'Ext.panel.Panel', layout: {type: 'vbox',align:'stretch'}, title: 'hello', id: 'mainContainer' }) In Controller : var items = []; for(var i=0;i<6;i++){ var vContainer = []; var hContainer = []; for(var j=0;j<7;j++){ hContainer.push({ xtype: 'panel',

Extjs grid column header, add dropdown menu item to specific columns

回眸只為那壹抹淺笑 提交于 2019-12-07 04:20:46
问题 I'm trying to add a button to the column header drop-down menus in my grid. However, I only want to add it to columns with certain itemId. So far I've got it working to add the button to all columns, see code below. I dont see where I could check each column's itemId though, it doesn't seem to iterate through the columns. Is there any workaround for this? Thank you! items:[{ region:'center', xtype:'grid', columns:{ items: COLUMNS, //defined in index.php }, store:'Items', selType: