extjs

extjs - center a formPanel on a normal panel

狂风中的少年 提交于 2020-01-24 11:53:38
问题 I'm using extjs and just trying to solve a simple problem: I have a form with a fixed width. I want to Center this form within a normal Ext.Panel. I'm trying to achieve this the 'css-way' - setting the left and right margin to 'auto'. But this doesn' work, it seems the margins are just ignored. The Code: var curStateForm = new Ext.FormPanel({ title:'test', width:300, bodyStyle:'margin:5px auto 0 auto', items: [edIst, edAdjust, edSumme] }); var testPanel = new Ext.Panel({ width: '100%', frame

Button click event Ext JS

六月ゝ 毕业季﹏ 提交于 2020-01-24 11:27:06
问题 I have the simple form: myForm = new Ext.form.FormPanel({ width:'100%', frame:false, items: [ new Ext.form.TextArea({ id:'notes', name: 'notes', hideLabel: true, width:350, height:200 }) ], buttons: [ { text:"Save", click: function (b,e) { alert('x'); } } ] }); However I am having trouble getting the click event of the button to work. Do buttons created the following way have the same functionality of doing Ext.Button? 回答1: You either need a) The handler option (a click shortcut) new Ext

Universal app: only build classic toolkit

痞子三分冷 提交于 2020-01-24 08:43:25
问题 I have to create a universal app from scratch. First the classic app, and at some point in the future, the modern app. I have generated the app using Cmd. I have implemented the basics I need for the classic app, split off everything that can be reused in the modern app and put it into the shared directory. The problem is that now, when I compile with Cmd, I get the error that dependencies are missing (because views are missing in the modern app that I have implemented for classic only, but

Adding rows to grid

不问归期 提交于 2020-01-24 01:39:25
问题 I am trying to add rows to my grid. I saw an example in the docs: onAddRouteClick: function(){ // Create a model instance var rec = new KitchenSink.model.grid.Plant({ buying_vendor_id: 12, country_code: '1', route: 0 }); this.getStore().insert(0, rec); this.cellEditing.startEditByPosition({ row: 0, column: 0 }); } But i cant seem to make it work in my code. This is my grid: onBtnRoutesSearchClick: function(button, e, options){ var me = this; var v_url = 'GetRoutes.jsp?' + Ext.urlEncode({

Sencha Touch: Panel.hide()/show() works only after resize

本秂侑毒 提交于 2020-01-24 01:20:14
问题 Here's a demo app: demo Sencha Touch app. The button in the bottom-left corner should show/hide the menu panel on top of the "Location info goes here" bar, however, it works in a strange way. Here's how (IMO) it should work: I click a button A panel appears Here's how it works now: I click a button Nothing happens I resize a window or press F11 (which is resizing too, anyway) A panel appears So, can somebody explain why is this happening and how can I solve my issue? Thx. 回答1: I've found a

Sencha Touch 2.0 and navigation.View - MVC

爱⌒轻易说出口 提交于 2020-01-24 00:32:08
问题 I would like to switch views with a button, there is absolutely no examples of it in a MVC context in the sencha documentation although they recommend developers to use their build in MVC architecture. I guess its because Touch 2.0 is rather new. http://docs.sencha.com/touch/2-0/#!/api The video about the list component is also about navigation.View, but since the list component is used, they dont show how to switch views with a button. Video: Intro to List Component This is the code i have

Cannot call method 'substring' of undefined app.js:1 sencha nested

帅比萌擦擦* 提交于 2020-01-23 23:29:31
问题 Cannot call method 'substring' of undefined app.js:1 I get this error on the build package version of a sencha touch app that's based on the building your first app tutorial on sencha doc. The regular version runs just fine, but when it is build I Just get a blue screen. The built version runs fine when I comment the proxy related lines for the nestedlist. proxy: { type: 'jsonp', url: 'https://ajax.googleapis.com/ajax/services/feed/load?v=1.0&q=http://feeds.feedburner.com/SenchaBlog', reader:

Cannot call method 'substring' of undefined app.js:1 sencha nested

半世苍凉 提交于 2020-01-23 23:29:13
问题 Cannot call method 'substring' of undefined app.js:1 I get this error on the build package version of a sencha touch app that's based on the building your first app tutorial on sencha doc. The regular version runs just fine, but when it is build I Just get a blue screen. The built version runs fine when I comment the proxy related lines for the nestedlist. proxy: { type: 'jsonp', url: 'https://ajax.googleapis.com/ajax/services/feed/load?v=1.0&q=http://feeds.feedburner.com/SenchaBlog', reader:

ExtJS 4 - How to display template having width greater than the width of combo-box?

自闭症网瘾萝莉.ら 提交于 2020-01-23 16:17:40
问题 I have a combo-box in which the values are being displayed in a template. Now, I want the width of the template to be more than that of combo-box and hence I am using matchFieldWidth:false as mentioned at the link - ExtJS ComboBox dropdown width wider than input box width? But when I do so, then in the list of values there is no scrollbar displayled due to which the user is able to see only the first two values. The complete list gets displayed as soon as matchFieldWidth:false is removed, but

ExtJS 4 - How to display template having width greater than the width of combo-box?

落爺英雄遲暮 提交于 2020-01-23 16:16:47
问题 I have a combo-box in which the values are being displayed in a template. Now, I want the width of the template to be more than that of combo-box and hence I am using matchFieldWidth:false as mentioned at the link - ExtJS ComboBox dropdown width wider than input box width? But when I do so, then in the list of values there is no scrollbar displayled due to which the user is able to see only the first two values. The complete list gets displayed as soon as matchFieldWidth:false is removed, but