extjs4

Dynamic Model with ExtJS 4

拟墨画扇 提交于 2020-01-09 04:19:05
问题 With ExtJS 3.x, I was able to use the "fields" property of a Store, but it seems with ExtJS 4 I have to absolutely use a Model. It's fine, but in my case, it's not a static Model, and I need to define the fields on the fly and sometimes to change them. I could re-create a Model, but I need to use a different name as it's apparently not possible to modify an exisiting Model, neither delete it. If I try to use Ext.regModel with the same name, ExtJS crashes. Thanks for your help! 回答1: 4.1 UPDATE

How to create custom ExtJS form field component?

本秂侑毒 提交于 2020-01-09 04:18:57
问题 I want to create custom ExtJS form field components using other ExtJS components in it (e.g. TreePanel). How can I do it most easily? I've read docs of Ext.form.field.Base but I don't want to define field body by fieldSubTpl . I just want to write code which creates ExtJS components and maybe some other code which gets and sets values. Update: Summarized purposes are the followings: This new component should fit in the form GUI as a field. It should have label and the same alignment (label,

ExtJs - Filter a grid with a search field in the column header

元气小坏坏 提交于 2020-01-09 03:19:52
问题 In ExtJs, there are many options to filter a grid. There are two nice examples in the documentation, like referenced in this question. Remote filtering Local filtering However, having the filter hidden in the default dropdown menu of Ext.ux.grid.FiltersFeature looks really awkward for me. A good ergonomic choice would to create search fields in the column headers, like @Ctacus shows in his question. How can this be achieved ? 回答1: After quite much research through the sparse documentation,

Extjs4 Sending accented characters to the server

 ̄綄美尐妖づ 提交于 2020-01-06 11:23:02
问题 I am working with Extjs4. I am trying to send accented characters to server. I was trying to send ó. And what I was receiving at the server side was ó. I am sending it using Store proxy. In store proxy, I have added headers: { 'Content-Type': 'charset=utf-8' } Still it did not send the accented characters properly. How should I send accented characters to the server? Thanks in advance! 回答1: user2316489, IMHO this is a problem with your server configuration, rather than a front-end

Extjs4 Sending accented characters to the server

天涯浪子 提交于 2020-01-06 11:20:30
问题 I am working with Extjs4. I am trying to send accented characters to server. I was trying to send ó. And what I was receiving at the server side was ó. I am sending it using Store proxy. In store proxy, I have added headers: { 'Content-Type': 'charset=utf-8' } Still it did not send the accented characters properly. How should I send accented characters to the server? Thanks in advance! 回答1: user2316489, IMHO this is a problem with your server configuration, rather than a front-end

ExtJS 4 treepanel with checkbox issue

时间秒杀一切 提交于 2020-01-06 08:24:08
问题 We are using treepanel with check box in our application.It seems like: var treepanel = { id : 'tree', xtype : 'treepanel', store : layerStore, rootVisible : false, listeners : { checkchange : function(node,check){ if(node.get('id') == 'teacher'){ alert('you have selected teacher node'); }else if(node.get('id') == 'student'){ alert('you have selected student node'); } } } }; LayerStore code: var layerStore = Ext.create('Ext.data.TreeStore',{ root : { children : [ { text : 'teacher layer', id

extjs4 MVC Scope Issue

ε祈祈猫儿з 提交于 2020-01-06 07:58:10
问题 I am trying to call resetCombo method once i click on link from tooltip which is rendered on combo But i am not able to access it because of scope issue not sure what i am missing. Please help me on this. Ext.define('test.BasicForm', { extend: 'Ext.form.Panel', renderTo:Ext.getBody(), initComponent :function(){ this.items=[ { fieldLabel: 'Test', xtype: 'combo', displayField: 'name', width: 320, labelWidth: 130, store: [ [1, 'Value 1'], [2, 'Value 2'], [3, 'Value 3'], [4, 'Value 4'] ],

extjs4 store addes get params in the url

半世苍凉 提交于 2020-01-06 07:52:53
问题 i'm using extjs4 store In xhtpp calls it shows the http://localhost/home_dir/index.php/questions/content_pie?_dc=1312366604831&hi=&page=1&start=0&limit=25 This is the store code var content_type_store = new Ext.data.Store({ proxy: new Ext.data.HttpProxy({ url: BASE_URL+'questions/content_pie', method:'POST', params :{hi:''} }), reader: new Ext.data.JsonReader({ root: 'results' }, [ 'qtype', 'qval' ]) }); Even though i set the method as POST its get params appears in url I'm using codeigniter

extjs4 store addes get params in the url

坚强是说给别人听的谎言 提交于 2020-01-06 07:52:27
问题 i'm using extjs4 store In xhtpp calls it shows the http://localhost/home_dir/index.php/questions/content_pie?_dc=1312366604831&hi=&page=1&start=0&limit=25 This is the store code var content_type_store = new Ext.data.Store({ proxy: new Ext.data.HttpProxy({ url: BASE_URL+'questions/content_pie', method:'POST', params :{hi:''} }), reader: new Ext.data.JsonReader({ root: 'results' }, [ 'qtype', 'qval' ]) }); Even though i set the method as POST its get params appears in url I'm using codeigniter

How can I convert frm php to c# or json? [closed]

心已入冬 提交于 2020-01-06 04:57:12
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 4 months ago . I am using the browser-layout example for my application I'm trying to add a two trees to it. I'm trying to define the twotrees in a separate file, my main file is the layout-browser.js and i need to add this (and others) in the tabs I have in it. The problem is that I'm using