extjs

Sencha Touch MVC — recommended ways of passing data through the controller?

让人想犯罪 __ 提交于 2019-12-18 15:30:28
问题 I'm using Sencha Touch for a mobile app and am using the MVC functionality in it. I like Sencha quite a bit but I'm having a little trouble when it comes to passing data from one 'screen' to the next using the controller. There's a "record" property associated with a number of the Sencha widgets --indicating the currently selected record in an Ext.list for instance-- and for some reason I can't quite get there as to how to pass something like that from an Ext.Panel to another one. For

ExtJs dependent field validation

女生的网名这么多〃 提交于 2019-12-18 15:02:09
问题 How do I validate one field which is dependent on another field? { xtype: 'textfield', name: 'name2', vtype: 'type', // how to write the validation code for this if it // depends on the value of another field? allowBlank: false } 回答1: By adding your own custom validator and therein perform your validation. var field_one = new Ext.form.TextField({ name: 'field_one', fieldLabel: 'Field one' }); var field_two = new Ext.form.TextField({ name: 'field_two', fieldLabel: 'Field two', validator:

Trigger click event on link tag in JS for Android and iPhone

痴心易碎 提交于 2019-12-18 13:33:24
问题 I am developing mobile web application using Sencha Touch (JavaScript & ExtJS). I have a link tag (just <a> tag with href ), and I need to trigger click event on it. I have found that call of myelement.dom.click(); do the job, but it's not working for Android... Is there some kind of universal solution? UPDATE I have a container with html code: <a href="http://google.com" id="link_to_click" target="_blank">CLICK ME</a> I need to simulate click on this link using only plain JavaScript and

Set focus on Extjs textfield

邮差的信 提交于 2019-12-18 12:48:07
问题 Currently I got problem with setting focus on extjs textfield. When form show, I want to set focus to First name text box and I try to use build in function focus() but still can't make it work. I am happy to see your suggestion. var simple = new Ext.FormPanel({ labelWidth: 75, url:'save-form.php', frame:true, title: 'Simple Form', bodyStyle:'padding:5px 5px 0', width: 350, defaults: {width: 230}, defaultType: 'textfield', items: [{ fieldLabel: 'First Name', name: 'first', id: 'first_name',

How to read and set a value of a specific cell in an ExtJS Grid?

不想你离开。 提交于 2019-12-18 12:38:09
问题 I am beginning with ExtJS. I am trying to read a value from a cell that is selected I use an EditorGrid and the store looking like that : my_store = new Ext.data.JsonStore({ root: 'topics', totalProperty: 'totalCount', idProperty: 'details_id', fields: [ {name : 'index', type : 'int'}, {name : 'inactive', type : 'int'}, {name : 'c_1', type : 'string'}, {name : 'c_2', type : 'string'}, {name : 'c_3', type : 'string'}, {name : 'c_4', type : 'string'} ], proxy: new Ext.data.ScriptTagProxy({ url:

How do you include a UX class in the MVC pattern?

大憨熊 提交于 2019-12-18 12:31:23
问题 Before the MVC pattern I would include UX classes simply by including this at the top of the JS, before Ext.onReady : Ext.Loader.setConfig({enabled: true}); Ext.Loader.setPath('Ext.ux', 'extjs/examples/ux'); Ext.require([ 'Ext.ux.grid.FiltersFeature' ]); Now I am working with the MVC pattern and I have a gridpanel that needs to use this same feature. I've included a requires statement in the view like this: Ext.define('ST.view.StudentLog', { extend: 'Ext.grid.Panel', alias: 'widget.studentlog

An Extjs App Calling another Extjs APP

断了今生、忘了曾经 提交于 2019-12-18 12:00:38
问题 after generating a Workspace using Sencha Cmd and create Two different app, i just want to Run the first app and then after clicking a button,it calls the second app :) Like A main app calling another sub-app is there a way to do it ? thx for your help 回答1: You can develop separated modules that can work together with no problems. Both concepts are no in conflict at all. Let me share my experience here. When we started in our current project (from the scratch) there were other two teams

How can I change/add params on a store

浪尽此生 提交于 2019-12-18 11:58:34
问题 On a sencha-touch, here's is my store declaration Ext.regStore('newsStore', { model: 'News', autoLoad: true, proxy: { type: 'ajax', url: '../news/list.form?format=json', reader: { type: 'json', root: '' } }, }); How can I modify params? I tried params:{ format: 'json'} But its doesn't work! 回答1: Store declaration new Ext.data.Store({ model:'prj.models.ContactInfo', storeId:'contactInfoId', proxy:{ type:'ajax', url:'/GetContactInfoByID', reader:{ type:'json' }, extraParams:{ format:'json' },

Applying loadMask() to a single element in extjs?

烂漫一生 提交于 2019-12-18 11:53:47
问题 How to apply loadMask to only one element, and not the whole browser width-height? default here, only one element is masked, and a messageBox is in center, inside this element and not the whole display... any ideas? EDIT: @Molecule , thanks, but this is when data is loading from some source, what i need is : { xtype:"button", text:"Alert", handler: function(){ Ext.Msg.show({ title:'Save Changes?', msg: 'You are closing ?', buttons: Ext.Msg.YES, setLoading: // here somehow only mask parent

ExtJs4 - Store baseParams config property?

允我心安 提交于 2019-12-18 11:47:49
问题 In extjs3.x I used the stores baseParams config property to specify parameters used to load the store. This property no longer exists in extjs 4. What should I do instead of this? Also in extjs3 I was able to specify wether the stores proxy was a GET or a POST method by using the proxy method config property. What should I do instead of this? My ExtJs 3 code -> var store = new Ext.data.JsonStore({ root: 'Data', baseParams: { StartDate: '', EndDate: ''' },//baseParams proxy: new Ext.data