extjs

Date.parse() is not working in Fire Fox and IE.Its working fine in Chrome

萝らか妹 提交于 2019-12-12 03:49:17
问题 How to convert the string which is having date time to date time format. My code is: In Chrome its working fine: var str = "05-Sep-2013 01:05:15 PM " var res = Date.parse(str) console.log(res) //o/p:1378366515000 var result = new Date(res) console.log(result) //o/p:Thu Sep 05 2013 13:05:15 GMT+0530 (India Standard Time) In Firefox and IE: console.log(res) //o/p: NaN console.log(result) //o/p: Date {Invalid Date} Could you please help me out. thanks in advance. 回答1: Parse the string yourself

Using BoundList as widget

落花浮王杯 提交于 2019-12-12 03:43:02
问题 I have an extended bound list, and I use it as a widget. Get/set value and other works good, but: How can I add a field label before it? Example of set value: setValue: function (v) { this.value = v; // TODO select selected var sm = this.getSelectionModel(); var store = this.getStore(); var rec = store.findRecord(this.valueField, v); sm.select(rec); }, Can you help me? Or is the only solution that I have to put this bounding list in a panel? 回答1: The easiest way to get around this is to put

Secha ExtJs workspace and multiple pages(apps)

天大地大妈咪最大 提交于 2019-12-12 03:37:08
问题 I understand how to create and use multiple pages(or apps) within a workspace and build them. I am kind of confused about how do you make these multiple apps talk to each other ? lets say I have two apps in my workspace - App1 and App2. I can use routing and make apps talk to each other if the value is simple enough(like a user id). What If i have to send multiple id's or data from App1 to App2 ? 回答1: I think you have a few options available. URL Parameters that you parse when instantiating

How to refer the store in Controller --> Code.js file?

╄→гoц情女王★ 提交于 2019-12-12 03:29:12
问题 I am storing the JSON format in to Code.js of store folder. 'store' folder --> Code.js Ext.define('LoginPage.store.Code', { extend: 'Ext.data.Store', model: 'LoginPage.model.Code', autoLoad: true, proxy: { type: 'ajax', api: { read: 'data/loginResponse.json', update: 'data/checkCredentials.json' //contains: {"success": true} }, reader: { type: 'json', root: 'login', successProperty: 'success' } } }); 'model' folder --> Code.js Ext.define('LoginPage.model.Code', { extend: 'Ext.data.Model',

how to load ajax response in memory in extjs

匆匆过客 提交于 2019-12-12 03:27:12
问题 How to load data in memory in extjs .by using an ajax response.ajax response give an json data. when i try to load into paging grid it doesnt show anything .can any one you idea.its help full to me var itemsPerPage = 10; // set the number of items you want per page // i am creating a store to load data into memory var store = Ext.create('Ext.data.Store', { autoLoad: true, fields:['id','name', 'email'], pageSize: itemsPerPage, // items per page proxy: { type:'memory', enablePaging: true,

Why don't added records appear in grid?

非 Y 不嫁゛ 提交于 2019-12-12 03:18:06
问题 I created a custom field for multiple file uploading, the problem is in the first step i couldn't even add selected file to grid, can you tell me what is the problem of my code? I looked at firebug and there is no java-script error. Ext.define('VDOA.form.fields.Attachment', { extend: 'Ext.form.FieldContainer', mixins: {field: 'Ext.form.field.Field'}, requires: ['Ext.form.field.Base'], alias: 'widget.attachment', layout: 'fit', constructor: function() { var me = this; me.items = [ { itemId:

ExtJS form.field.date recalculates date if non-valid MM or DD is entered. How to prevent?

半世苍凉 提交于 2019-12-12 03:17:53
问题 The default ExtJS form.field.date allows manual entry/editing of a date in addition to using the datepicker. However, if you enter a number larger than 31 for the DD or larger than 12 for the MM it recalculates the value. For example, if the MM/DD/YYYY listed is 12/01/2011 and you edit it to say 15/01/2011 (where the max MM value should be 12), it recalculates to display 03/01/2012 -- assuming that you meant to add 3 beyond the max value. Is there any way to turn off this functionality? I'd

Gridpanel auto Height inside TabPanel

血红的双手。 提交于 2019-12-12 03:17:31
问题 I am trying to get a gridpanel inside a tabpanel to display with proper height. The tab in question is maincontentpanel3 . Right now, the width does 100%, but the height seems to go until the panel is filled, way past the bottom of the page. Scroll bars do not appear, even if autoscroll is set to auto. If I give GridPanel1 a height, everything works properly except for (obviously) the height. Here is the stripped down code: <ext:Viewport runat="server" Layout="FitLayout"> <Items> <ext:Panel

Extjs filtering is not Working properly

孤街浪徒 提交于 2019-12-12 03:14:33
问题 I am new to ExtJS. I have written a code for applying filtering in a Grid, but it is not working properly. Attaching the code snippet which I have written for applying filtering. Without filters, the grid is properly displayed at the panel. Ext.create('Ext.data.Store', { storeId: 'userDetailsStore', fields: ['username', 'firstname', 'lastname', 'role', 'activeuser'], data: {'items': [ {"username": 'USER1', "USER1-firstname": "firstname", "lastname": "USER1-lastname", "role": 'Admin',

Accessing an iframe inside a tab panel extjs4.2

喜欢而已 提交于 2019-12-12 03:13:37
问题 I have a tab panel formed of two tabs. I'm trying to access the iframe in each tab by using "window.frames["id"]" but i'm getting undefined when alerting it. How to access the iframe in my case? tabPanel = Ext.create('Ext.tab.Panel', { region: 'center', activeTab: 0, autoScroll: true, items: [ { id:"panel_A", title: "${tr.A}", html: "<iframe src= '"+A_url +"' width='100%' height='100%' id='frm_A' name='frm_A' frameborder=0 />", },{ id:"panel_B", title: "${tr.B}", //disabled:tabs_status, /