extjs

show message box ext window beforeclose event

女生的网名这么多〃 提交于 2019-12-24 06:44:13
问题 I want to show message box when user click (X) button of ext window, and on 'ok' button of message box window will close. I wrote the code but it closes window first than show message box. Here is the code: var assignReportFlag = 0; var assignReportLoader = function(title,url){ var panel = new Ext.FormPanel({ id: 'arptLoader', height: 485, border: false, layout: 'fit', autoScroll: true, method:'GET', waitMsg: 'Retrieving form data', waitTitle: 'Loading...', autoLoad: {url: url,scripts: true}

How to disable items in a combobox in Ext JS?

风流意气都作罢 提交于 2019-12-24 05:33:08
问题 How can I disable specific items in a combobox in Ext JS? For example I have these records row_1_type_1 row_2_type_2 row_3_type_3 and I want to disable the third row i.e it should stay in the combo as label but it will be greyed out and not clickable. 回答1: Here's a solutions that you can use at least for Ext JS 4.2.1. It's a plugin that disables some items in the boundlist based on the value of each record. The name of the field to check if the listitem should be disabled can be configured.

extjs remove duplicate value before storing it into a store

[亡魂溺海] 提交于 2019-12-24 04:47:10
问题 I try to remove the duplicate value before storing it into a store. I want to store the same value in the store 1 time only. But it seems the following Ext.Array.unique line does not working. Could anyone please help me to correct this. Thank you var input1store = new Ext.data.Store({ fields: [{name: 'name'}], proxy: { type: 'ajax', url: 'www.requesturl.com?format=json&source1', reader: { type: 'json', root: 'xml.result' } }, autoLoad: false, sorters: [{property: 'name', direction: 'asc'}],

Deploy same Javascript webapp build to different environments

荒凉一梦 提交于 2019-12-24 04:14:09
问题 I have an ExtJS application and some different environments (local machine, development, production-like test environment, and production). The ExtJS application is backed by a Java backend which is also running on either a local machine, in a development environment, a production-like test environment or a production environment (not the same servers as where the front end application lives though). For the last two environments, I want to build ONE build of the ExtJS app and first deploy it

Reset Form Record Not Clearing Values - ExtJS 4.2

随声附和 提交于 2019-12-24 03:55:09
问题 I have a Grid panel containing records which, on-click, will be loaded into a Form panel for editing. On "close" of our form panel, we're calling myForm.getForm.reset(), which seems to reset the record but the values in the form fields themselves persist. // Load record me.down('form').loadRecord(record); // Close me.down('form').getForm().reset() or me.down('form').reset() Please advise how to also clear values in the form upon resetting our record. 回答1: Do you have trackResetOnLoad set to

Why doesn't a store declared in a ViewModel get loaded?

不问归期 提交于 2019-12-24 03:42:34
问题 This question is related to Trying to bind a store to a ViewModel, but is a different question. I'm declaring a store in a viewmodel like this: Ext.define('Mb.view.rma.DetailsModel', { extend: 'Ext.app.ViewModel', alias: 'viewmodel.rma-details', requires: ['Mb.model.rma.Detail'], data: { id: 0 }, stores:{ details: { //store: 'rma.Details', type: 'rmaDetails', // correction as suggested by @scebotari filters: [{ property: 'rma', value: '{id}' }], remoteFilter: true } } }); When I instantiate

Why doesn't a store declared in a ViewModel get loaded?

余生长醉 提交于 2019-12-24 03:42:22
问题 This question is related to Trying to bind a store to a ViewModel, but is a different question. I'm declaring a store in a viewmodel like this: Ext.define('Mb.view.rma.DetailsModel', { extend: 'Ext.app.ViewModel', alias: 'viewmodel.rma-details', requires: ['Mb.model.rma.Detail'], data: { id: 0 }, stores:{ details: { //store: 'rma.Details', type: 'rmaDetails', // correction as suggested by @scebotari filters: [{ property: 'rma', value: '{id}' }], remoteFilter: true } } }); When I instantiate

Cannot access Ajax JSON data objects

你。 提交于 2019-12-24 03:28:02
问题 I have a JSON response returning from an Ajax call but cannot seem to access any part of the JSON at all. The JSON format is: [{"id":"1","description":"Employee","coverage":"Center","covered":"X"}] I have tried the following and nothing works: success: function(result, request){ jsonData = Ext.util.JSON.decode(result.responseText); var id = jsonData.id; alert(id); } * returns as undefined success: function(result,request){ jsonData = result.responseText ##shows the Json perfectly alert

Extjs, handling success or failure when doing a standard submit in a form

时光怂恿深爱的人放手 提交于 2019-12-24 03:23:09
问题 I'm downloading a file from a servlet with a form submit in Ext, but when I try to handle the success or failure of my submit it just never get fired and my waitMsg goes on forever. Any help would be appreciated. var form = Ext.create('Ext.form.Panel',{ standardSubmit: true, url: '../ObtenerArchivoAdjuntoServlet', }); form.submit({ waitMsg: 'Descargando...', params:{ nombreArchivo:nombreArchivo }, success: function(form, action){ //not getting fired //do something }, failure: function(form,

passing parameter to server in ExtJs

拥有回忆 提交于 2019-12-24 03:21:05
问题 I am new in ExtJs. I want to pass the value in my textbox to the server(Servlet) when I click on to the button. But as I am new to it I don't kn how to do it. Please someone help me into this or suggest me some tutorial or example for this 回答1: Ext.Ajax.request can help you. Code will be look like this: new Ext.Button({ text: "Send to server", handler: function () { Ext.Ajax.request({ url: 'myPage.php', success: function (){alert('Value has been sent!');}, failure: function (){alert('Failure