extjs4

What is difference beetween layout:'hbox' and layout:'column'

ⅰ亾dé卋堺 提交于 2019-12-21 13:06:41
问题 What is difference beetween layout:'hbox' and layout:'column' ? Is it only syntax? Example ' column ': layout:'column', items: [{ title: 'Width = 25%', columnWidth: .25, html: 'Content' },{ title: 'Width = 75%', columnWidth: .75, html: 'Content' },{ title: 'Width = 250px', width: 250, html: 'Content' }] Example ' hbox ': layout: { type: 'hbox', pack: 'start', align: 'stretch' }, items: [ {html:'panel 1', flex:1}, {html:'panel 2', width:150}, {html:'panel 3', flex:2} ] 回答1: There are a couple

Where to add Global variables in ExtJS MVC?

一世执手 提交于 2019-12-21 09:28:31
问题 I am wondering where to add global variables for an ExtJS Application. I already looked at some suggestions in stackoverflow that mention that you can add them inside app.js. But, can anyone be more specific? My app.js looks something like this: Ext.application({ launch: function() {..} }); So, where exactly do the variables go? In the launch function? Outside Ext.application ? 回答1: Declare your own object namespace and add them there: Ext.ns('My.Application.Globals'); My.Application.Globals

ExtJS 4: cloning stores

我的未来我决定 提交于 2019-12-21 07:34:10
问题 I'm trying to figure out how to clone an Ext.data.Store without keeping the old reference. Let me explain better with some code. Here's the source store: var source = Ext.create ('Ext.data.Store', { fields: ['name', 'age'] , data: [ {name: 'foo', age: 20} , {name: 'boo', age: 30} , {name: 'too', age: 10} , {name: 'yoo', age: 80} , {name: 'zoo', age: 30} ] }); Follows an example of what I want to do: var target = source; target.removeAll (); // Here I need to have target empty and source

Sencha Touch & ExtJS profiles for desktop and mobile in one web project/vhost?

社会主义新天地 提交于 2019-12-21 06:22:24
问题 I'm creating a web application with desktop and mobile versions using ExtJS and Sencha Touch. ExtJS 4 and Sencha Touch 2 use an MVC approach, and Sencha Touch 2 incorporates "profiles" for different devices (iPhone, tablet, etc.). ExtJs 4, however, has no notion of profiles. Is it realistically feasible to for dependencies for desktop, iPhone, and iPad versions of the app to live under one vhost, in the same app directory hierarchy? Or, is it generally more acceptable to use different vhosts

Sencha Touch & ExtJS profiles for desktop and mobile in one web project/vhost?

ぃ、小莉子 提交于 2019-12-21 06:21:57
问题 I'm creating a web application with desktop and mobile versions using ExtJS and Sencha Touch. ExtJS 4 and Sencha Touch 2 use an MVC approach, and Sencha Touch 2 incorporates "profiles" for different devices (iPhone, tablet, etc.). ExtJs 4, however, has no notion of profiles. Is it realistically feasible to for dependencies for desktop, iPhone, and iPad versions of the app to live under one vhost, in the same app directory hierarchy? Or, is it generally more acceptable to use different vhosts

Sencha Touch & ExtJS profiles for desktop and mobile in one web project/vhost?

流过昼夜 提交于 2019-12-21 06:21:28
问题 I'm creating a web application with desktop and mobile versions using ExtJS and Sencha Touch. ExtJS 4 and Sencha Touch 2 use an MVC approach, and Sencha Touch 2 incorporates "profiles" for different devices (iPhone, tablet, etc.). ExtJs 4, however, has no notion of profiles. Is it realistically feasible to for dependencies for desktop, iPhone, and iPad versions of the app to live under one vhost, in the same app directory hierarchy? Or, is it generally more acceptable to use different vhosts

dynamically set fields to a extjs data store

自作多情 提交于 2019-12-21 05:41:43
问题 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,

extjs4 grid - changing column editor per row basis

≯℡__Kan透↙ 提交于 2019-12-21 05:17:24
问题 ExtJS4 grid anticipates appropriate editor (cellEditor or rowEditor) per column. If a column's header field is dateField - date selector will be applied on every row in that column. What I need is an editor with different field editors per row, not per column. The Extjs3 solution is provided here - unfortunately doesn't fit in Extjs4 case. (please check that link to see explanatory images, cause I can't post images yet) There's also a single column solution called property grid, but again -

Extjs create dynamic accordion using store

て烟熏妆下的殇ゞ 提交于 2019-12-21 02:42:10
问题 I'm beginning development of an app in extjs. I'm using the MVC approach, as provided in the extjs documentation. I have some dynamic data which needs to present the user with a set of accordion controls. I've got the data in a store, but I do not know how to dynamically create the accordion items (unlike grid panels, there doesn't appear to be a store data method). Here is my current accordion view code - with static items: Ext.define('BP.view.induction.LeftPage', { extend: 'Ext.Panel',

Overriding Extjs classes and invoking callParent

谁都会走 提交于 2019-12-20 11:49:49
问题 I have a few months of experience developing Extjs web application. I ran into this problem: When I override a class, I modified the method and followed the previous implementation and invoke callParent() . The overriding part works but the callParent() invoked the old implementation. my overriding code Ext.override(Ext.layout.component.Draw, { finishedLayout: function (ownerContext) { console.log("new layouter being overriden"); this.callParent(arguments); } }); The Extjs class method to be