extjs

extjs refresh tree store

允我心安 提交于 2020-01-04 08:59:17
问题 how to refresh a Tree Store ? I tried to do like that: Ext.getStore('myStore').setRootNode({child: []}); And then the Store will request the Server to have children but sometimes it gives me a child in double. In my Tree I get something like: child1 child2 child1 and there is also a javascript error: Uncaught TypeError: Cannot read property 'internalId' of undefined Ext.define.updateIndexes ext-all-debug.js:61588 Ext.define.onAdd ext-all-debug.js:61513 Base.implement.callParent ext-all-debug

EXTJS & PHP Upload file

。_饼干妹妹 提交于 2020-01-04 08:37:11
问题 I use the UploadFile example in EXTJS (http://dev.sencha.com/deploy/dev/examples/form/file-upload.html) but I don't know what to write in the server side to save the uploaded file (in php) help me please My client side code is : var fp = new Ext.FormPanel({ //renderTo: 'fi-form', fileUpload: true, width: 500, frame: true, title: 'File Upload Form', autoHeight: true, bodyStyle: 'padding: 10px 10px 0 10px;', labelWidth: 50, defaults: { anchor: '95%', allowBlank: false, msgTarget: 'side' },

how to track in gridview whether filter is applied or not in extjs?

感情迁移 提交于 2020-01-04 06:45:24
问题 My task is to put an image on the extjs grid column header whenever filter is applied in that column. When filter is cleared remove the image from the grid column header. How to achieve this in extjs 3? 回答1: In ExtJS 3.4 when filter is active on a column .ux-filtered-column class is added to the header cell. Easiest way is to add custom style for this class. 回答2: GridView has a reference to the grid it is used by. Hence, you could use this.grid.store.isFiltered() to check whether store is

ExtJS menu checkItem: how to prevent item check event in certain circumstance?

匆匆过客 提交于 2020-01-04 05:52:40
问题 for a menu checkItem, when user clicks at it, by default it will trigger checkchange; i am wondering how to, if a certain case is met, not change its check status after clicked, in other words, stop this event chain. I tried following codes, but not work: listeners: { 'click': function(item, evt) { if(1) { //verify whether that certain case evt.stopEvent(); //since click_event is triggered before setChecked()/checkChange, I thought this may stop its going further... alert('case met!'); } },

how to set radiogroup radiofield based on the json data extjs 4

岁酱吖の 提交于 2020-01-04 05:35:32
问题 hi forum member I am having one problem with setting the radiofield in the extjs 4 my form radiogroup xtype code is given below { xtype: 'radiogroup', dataIndex: 'gender', margin: 5, fieldLabel: 'Gender', items: [{ xtype: 'radiofield', name: 'gender', boxLabel: 'Male', inputValue:'0' }, { xtype: 'radiofield', name: 'gender', boxLabel: 'Female', inputValue:'1' }] } my json data I am receiving is { "total": 1, "success": true, "employeedata": [{ "username": "yaryan997", "surname": "Singh",

EXT JS failed to load multi pages at the same time

故事扮演 提交于 2020-01-04 04:55:11
问题 By default my website are having multi tabs, when just refresh the web site, the first tabs haven't loaded, then i clicked second tabs. second tabs are working fine, but when u go back first tabs, it is blank. p/s: when the first tabs are haven't loaded finish, u are click a new tabs, that will cause this error from ext-all.js TypeError: b.getComputedStyle(...) is null ...f(p==k){if(a+E+l.width>(O>=0?u.x+u.width-b:b-u.x)){p=M}}else{if(a+E>l.width){p=k... 2 all the tabs header are included ext

How to use the 'overrides' folder generated by Sencha cmd for an Ext JS 4 project

十年热恋 提交于 2020-01-04 04:35:07
问题 I have generated a project using Sencha cmd. This creates a nice folder named 'overrides' where I have put my overridden Ext.Ajax class. I then include it in my app.js file like so requires: [ 'overrides.Ajax' ] This works just fine when using my app, however when I try to build it using Sencha cmd I get the following error: [ERR] BUILD FAILED [ERR] com.sencha.exceptions.BasicException: The following error occurred while e xecuting this line: [ERR] Z:\public_html\LoginScreen\.sencha\app\build

In ExtJs, how to insert a fixed string at caret position in a TextArea?

蓝咒 提交于 2020-01-04 04:20:50
问题 This question probably is asked in other framework, not sure if there is one on ExtJs, which I am new to. I wonder whether there is a simple example with a TextArea and a button. When the button is pressed, a fixed string "???" is inserted at the cursor in the TextArea. Thanks in advance. 回答1: You can actually do this straight from the DOM, using textareas selectionStart attribute to find the caret position. So you could do something along the lines of textArea.value = textArea.value

How to restrict ExtJs Textfield to accept only numbers using maskRe . (Should accept Positive , Negative , integer and decimal numbers.)

一世执手 提交于 2020-01-03 19:32:46
问题 I need to configure my ExtJs textfield to accept only numbers which can be positive , negative , integer and decimals upto 2 decimals . I tried with maskeRe and regular expression /^-?[0-9]\d*(\.\d+)?$/ . But its accepting only positive integers. User should not be able to type restricted characters. Also it should accept '-' only at first place and '.' in between and only once. So it should accept : 10, -10, 10.12, -10.34 etc Link to my fiddle Thanks 回答1: Change your maskRe to maskRe: /[0-9.

How to restrict ExtJs Textfield to accept only numbers using maskRe . (Should accept Positive , Negative , integer and decimal numbers.)

只谈情不闲聊 提交于 2020-01-03 19:32:04
问题 I need to configure my ExtJs textfield to accept only numbers which can be positive , negative , integer and decimals upto 2 decimals . I tried with maskeRe and regular expression /^-?[0-9]\d*(\.\d+)?$/ . But its accepting only positive integers. User should not be able to type restricted characters. Also it should accept '-' only at first place and '.' in between and only once. So it should accept : 10, -10, 10.12, -10.34 etc Link to my fiddle Thanks 回答1: Change your maskRe to maskRe: /[0-9.