extjs

When ever app does ajax request i want to add load mask

醉酒当歌 提交于 2019-12-22 17:29:11
问题 In my sencha application, When ever app does ajax request i want to add load mask and after request complete i need to remove load mask. I tried below code but, its not working for me var mask = new Ext.LoadMask(Ext.getBody(), {msg:"Loading..."}); Ext.Ajax.on('beforerequest', function(){ mask.show(); }); Ext.Ajax.on('requestcomplete', function(){ mask.hide(); }); 回答1: To show load mask you can use: Ext.Viewport.mask({ xtype: 'loadmask' }); And hide the load mask inside the success function of

Login screen only first time in native app in sencha

余生长醉 提交于 2019-12-22 17:08:31
问题 i am working on a native app in sencha touch . i want to create a login view which should be visible only first time. any suggestion how to solve it. Activation.js Ext.define('FOS.view.Activation', { extend: 'Ext.form.Panel', alias: "widget.activationview", requires: ['Ext.form.FieldSet', 'Ext.form.Password', 'Ext.Label', 'Ext.Img', 'Ext.util.DelayedTask'], config: { title: 'Login', items: [ { xtype: 'label', html: 'Activation failed. Please enter the correct credentials.', itemId:

How to skip over particular cells when tabbing through an Ext grid?

戏子无情 提交于 2019-12-22 16:11:21
问题 I have a grid panel where some cells are editable, and others aren't. I'd like to make it so that when you tab through the grid with your keyboard, the non-editable cells are skipped over i.e. never get selected. Here's my simple grid so far: var store = Ext.create('Ext.data.Store', { fields:['name', 'age', 'country'], data:[ {name:'Lisa', age:13, country: 'USA'}, {name:'Bart', age:75, country: 'France'}, {name:'Homer', age:32, country: 'Germany'}, {name:'Marge', age:56, country: 'Australia'}

path of view is incorrect in extjs 4 mvc application

六月ゝ 毕业季﹏ 提交于 2019-12-22 14:13:41
问题 I'm trying to deploy my mvc app into my large web application. I have defined the app folder and can see in fire bug that it is calling the correct files with the exception of the initial view. So "App.view.Jobs" is calling https://www.estore.localhost/Jobs/Edit/ext/jobs/App/view/Jobs.js?_dc=1328471746967 when i would like it to call https://www.estore.localhost/ext/jobs/App/view/Jobs.js?_dc=1328471746967 Ext.Loader.setConfig({ enabled: true }); Ext.application({ name: 'MyApp', appFolder: '

extjs 4 How too keep combobox in grid cell

北战南征 提交于 2019-12-22 12:25:56
问题 I've seen similar questions go unanswered elsewhere. I want to have a combobox in a column with two options (ASC, DEC) in it. I want it to show up in each row, or at least have its value show up when it's not selected. I know that its not a 'good idea' to render a combobox in each row, but in this case I know I will have a maximum of about 20 rows, so it shouldn't be a huge deal. If this can't be done I want to have the selected value from the combobox show. Currently I just have the

Google Places Auto-complete in extjs4

江枫思渺然 提交于 2019-12-22 11:13:33
问题 I am using extjs4 and Spring at server side. I need to integrate Google Places Auto-complete inside one of the extjs4 form. Is there any way this can be done. I am not sure weather we can integrate Google Auto-complete with extjs I have searched but not find anything more specific to my requirement. Please guide me ..... look at my code ... Ext.define('abce.view.ReportMissing', { extend : 'Ext.panel.Panel', alias : 'widget.report_missing', bodyPadding : 10, autoScroll : true, frame : true,

Sencha Touch: Clicking a button rapidly will push a view twice

旧巷老猫 提交于 2019-12-22 10:55:27
问题 Say I have a button that triggers a push of a new view. I noticed that if I click it more than once, fast enough, it will push the same view twice. You can mimic this behavior using their official docs on this page, where they have a live sample: http://docs.sencha.com/touch/2-0/#!/guide/navigation_view the clear question is, simply how to prevent it? 回答1: Masking successfully prevents double tapping problem. In my code I'm using two functions for mask/unmask navigation container: /** * Mask

Getting a loaded store in extjs4

北城余情 提交于 2019-12-22 10:29:06
问题 I am getting null while I try to obtain a loaded store from the controller. The load is a successful one too. I verified that. I have the store as follows. Ext.define('GridApp.store.schemedatastore',{ extend: 'Ext.data.Store', model: 'GridApp.model.schemedatamodel', autoLoad: true, alias: 'store.schemedata', storeId: 'schemedatastoreid', constructor:function(){ console.log('Calling parent'); this.callParent(arguments); }, listeners: { load:function(store,records,isSuccessful){ if(isSuccessful

Ext JS - How to Scroll to bottom of Textarea

梦想的初衷 提交于 2019-12-22 10:15:35
问题 This is my code below. How can I scroll to bottom of textarea? It must be something like Ext.getCmp('output').setScrollPosition(Ext.getCmp('output').getScrollHeight()); Here is my code for the textarea: var myWin= new Ext.Window({ height : 340, title : 'CHAT', modal : true, resizable : false, draggable : false, closable : false, width : 477, layout : 'absolute', bodyStyle : 'padding : 10px', buttonAlign : 'center', items : [ { id : 'output', xtype : 'textarea', width : 216, readOnly : true,

ExtJS 'datefield' validation override

旧巷老猫 提交于 2019-12-22 10:05:29
问题 I needed a datecolumn with some custom behaviour, specifically I needed to be able to enter in a date or and age in the same field (with an age staying rendered as an age and a date staying rendered as a date) Eg. Entering "23" will leave "23" in the field as a valid value, or entering "22/1/88" will leave "22/1/88" as valid value. So I tried having a datecolumn with the editor defined like this (note the validate override): editor: { xtype: 'datefield', format: 'd/m/Y', validate: function(){