extjs4.2

how to get array of objects from store in extjs 4.2 and send it to server side?

放肆的年华 提交于 2019-12-03 21:04:29
Hiii all, I am using Extjs 4.2 data grid and i have a requirement to convert my 'store' into json array and send that to server side(i.e java). This is my model. Ext.define('Writer.Document',{ extend: 'Ext.data.Model', fields: ['id', 'name', 'notes', 'Type', 'date'] }); and my store (which contains list of objects) is var store = Ext.create('Ext.data.Store', { model: 'Writer.Document', autoLoad: true, proxy: { type: 'ajax', url : 'findPatientRecordAction', reader: { type: 'json', successProperty: 'success', root: 'prognosis', messageProperty: 'message' } fields: ['id','name', 'date', 'notes' ,

Extjs 4.2: How to send parameters properly in a Ext.Ajax.Request POST

随声附和 提交于 2019-12-03 19:13:12
问题 I have to do a POST from my ExtJs script in order to delete something from my DB: Ext.Ajax.request({ url: 'deleteRole.html', method: 'POST', headers: {'Content-Type': 'text/html'}, waitTitle: 'Connecting', waitMsg: 'Sending data...', params: { "rolename" : rolename }, scope:this, success: received, failure: function(){console.log('failure');} }); when the post is sent i can see in the firebug the rolename in font but not as a param. I would like to show you another post (made with spring:form

dynamically set fields to a extjs data store

十年热恋 提交于 2019-12-03 16:40:25
I am trying to dynamically set fields to a extjs data store so that I could dynamically create a different grid at run time. Case A works for me. But when I use as in Case B , the store's proxy hangs on to the previous model and so the grid rendering is messed up. What is the really the difference between these two? Case A Ext.define('FDG.store.reading.FDGDynamicGridStore', { extend: 'Ext.data.Store' }); var fdgstore = Ext.create('FDG.store.reading.FDGDynamicGridStore', { fields: fields, proxy: { type: 'memory', reader: { type: 'json', totalProperty: 'tc', root: 'Result' } } }); fdgstore

Extjs4.2.1 - Load json to treepanel fails

一世执手 提交于 2019-12-03 15:38:55
I create a treepanel and I and create store like var store = Ext.create('Ext.data.TreeStore', { autoload: false, proxy: { type: 'ajax', url: 'data.php', reader: { type: 'json', root: 'results' } } }); my server print json look like { "results": [ { id : '1' , text : '1', expanded: true, children :[ { id : '5' , text : '5', leaf:true}, { id : '6' , text : '6', leaf:true} ] }, { id : '2' , text : '2', leaf:true}, { id : '3' , text : '3', leaf:true}, { id : '4' , text : '4', leaf:true}, { id : '7' , text : '7', leaf:true}, { id : '8' , text : '8', leaf:true}, { id : '9' , text : '9', leaf:true},

Rendering ExtJS 4+ MVC application in a html div - how-to?

允我心安 提交于 2019-12-03 10:03:33
问题 All examples that I have found so far explain how to render ExtJS (4.2) MVC application within the "viewport", which in other words means full browser screen, and occupying whole HTML BODY. I would like to render application within the existing HTML page within named DIV, so that I can have HTML design around the application. <div id="appdiv"><!-- application runs here --></div> I've seen some sites with ExtJS 4 examples that use trick to render ExtJS app within the page by using IFRAME. Is

Visual Studio 2012 ExtJS IntelliSense

余生颓废 提交于 2019-12-03 08:46:19
问题 Is there a way to get ExtJS intelliSense in Visual Studio 2012? This combined with the new JavaScript support would make my ExtJS projects much easier to code. 回答1: Adding reference path to ext-all within your js file will provide support. Specifically, using the ext-all-debug-w-comments provides supporting comments provided by sencha. /// <reference path="../../../ext/ext-all-debug-w-comments.js" /> 来源: https://stackoverflow.com/questions/20155317/visual-studio-2012-extjs-intellisense

extjs - How to disable pagination on a store

喜欢而已 提交于 2019-12-03 07:49:35
Whenever a store ( Ext.data.Store ) reads data from the server, it sends paging parameters like &page=1&start=0&limit=25 in a json proxy or [page:1, start:0, limit:25] using a direct proxy. I'd like to disable paging in the store or proxy configuration. I found this workaround, but I'm sure there must be a better method. proxy: { pageParam: undefined, startParam: undefined, limitParam: undefined, ... } Does anyone know how to disable paging properly ? Step store: { pageSize: 0, limit:0, .... } excluding from the request page: __ start: __ limit: ___ Another option is to override the proxy's

Rendering ExtJS 4+ MVC application in a html div - how-to?

不想你离开。 提交于 2019-12-03 00:33:52
All examples that I have found so far explain how to render ExtJS (4.2) MVC application within the "viewport", which in other words means full browser screen, and occupying whole HTML BODY. I would like to render application within the existing HTML page within named DIV, so that I can have HTML design around the application. <div id="appdiv"><!-- application runs here --></div> I've seen some sites with ExtJS 4 examples that use trick to render ExtJS app within the page by using IFRAME. Is it possible to avoid IFRAME? And, if it is, how skeleton of ExtJS 4.2 application shall look like if it

Visual Studio 2012 ExtJS IntelliSense

一笑奈何 提交于 2019-12-02 21:23:31
Is there a way to get ExtJS intelliSense in Visual Studio 2012? This combined with the new JavaScript support would make my ExtJS projects much easier to code. Adding reference path to ext-all within your js file will provide support. Specifically, using the ext-all-debug-w-comments provides supporting comments provided by sencha. /// <reference path="../../../ext/ext-all-debug-w-comments.js" /> 来源: https://stackoverflow.com/questions/20155317/visual-studio-2012-extjs-intellisense

ExtJS 4 - detecting if the user pressed “Print” on the print dialog that was called programatically

跟風遠走 提交于 2019-12-02 20:26:16
问题 Good day, I am building a web application wherein the user can print a panel and its contents. I found a code as seen here and tweaked it as such: Ext.define('My_app_name.override.form.Panel', { override: 'Ext.form.Panel', print: function(pnl) { if (!pnl) { pnl = this; } // instantiate hidden iframe var iFrameId = "printerFrame"; var printFrame = Ext.get(iFrameId); if (printFrame === null) { printFrame = Ext.getBody().appendChild({ id: iFrameId, tag: 'iframe', cls: 'x-hidden', style: {