extjs4

load a tree : ExtJs - Jayrock

一曲冷凌霜 提交于 2019-12-25 04:43:23
问题 im trying to build a treepanel (or just a simple tree i just need it to work) and load it with data from database here is my code to build the tree var objHandler = new Interact(); var treestore = new Ext.data.TreeStore ( { root:{ id:'root_node', nodeType:'async', text:'Root' }, proxy:{ type:'ajax', url:'myUrl' } }); function ReadTree() { try { objHandler.ReadAssets(function (serverResponse) { if (serverResponse.error == null) { var result = serverResponse.result; if (result.length > 2) {

Catch Ctrl+Enter when user typing text in Ext.form.field.HtmlEditor

僤鯓⒐⒋嵵緔 提交于 2019-12-25 03:49:15
问题 I'm trying to make ajax request when user press ctrl+enter while is entering text in Ext.form.field.HtmlEditor (xtype:'htmleditor'), but I don't know how to do it. I'got button next to the 'htmleditor' which can send the value of the 'htmleditor' but I'd like to add keyboard shortcut for that operation with ctrl+enter. Will appreciate some help. EDIT: It need to be made with ExtJS4 - somehow I must add something like 'keypress' listener to my htmleditor object... Here is the code.. this

Where is the bug in my recursive JSON parser?

梦想的初衷 提交于 2019-12-25 03:43:26
问题 I'd like to create a recursive function to parse json-like data as below. When key is xtype, a new class will be created. In particular, when xtype = gridpanel/treepanel, all the properties have to be its constructor argument, otherwise, properties will be added after class has been created. My recursive function as below, I got an error 'too much recursion' at line 21 in ext-all.js. Please take a look, how am I able to solve this problem? codes in main program: me.recursiveParser(null, data

ExtJS qtip and messagebox issues, text is truncated/missing depending on the browser

心不动则不痛 提交于 2019-12-25 02:44:43
问题 I am using EXTJS 4 (4.2.1.883) and experiencing issues with qtips and message boxes, on different browsers (Chrome, IE and Firefox) the text is getting truncated at different lengths. qtips on textfields getting truncated at different lengths on different browsers, here is what I have set for one textfield, in firefox I would get 'New U' msgTarget: 'side', maxLength: 15 , enforceMaxLength: true, blankText: 'New UserName is required ' Ext.Msg.show, the msg is getting truncated, different

ExtJS: Theming single component

北城余情 提交于 2019-12-25 02:40:07
问题 My target is to change header's font size for one single panel. I tried to read http://docs.sencha.com/extjs/4.2.1/#!/guide/theming, but all what I found was theming the whole applications, theming all-the-panels-in-the-project and overriding config options in "Theme JS Overrides", but no CSS variables overriding for single component. Is there any way to achieve it without fussing with this SASS for whole project? 回答1: Just add a class to the panel, then create a rule to match: new Ext.panel

ExtJs - Change Textfield VType dynamically

我的梦境 提交于 2019-12-25 02:22:14
问题 A rather straightforward question. No answer found anywhere. Using ExtJs 4.2 I have two custom VTypes, and one textfield. I want to change that textfield's vtype when the user clicks a radio button. I know that the text field has already been created so doing: textfield.vtype = 'otherType'; won't do it for me. Neither will: Ext.apply(textField,{vtype:'otherType'}); So the obvious stuff is out. Now I'm toying with destroying and re-creating it, but (if it even works) that seems like overkill.

extjs4 server side validation,how to?

一世执手 提交于 2019-12-25 02:16:32
问题 i have a form in extjs and i need to do some validation tests on it on server side and return a message error but i have no clue how to do this! i need to verify if the new added ip adress already exists i also need to verify if it is actually a valid adress (i have a c# function that can do this) if these conditions are ok it can be added. if not, i'd like to show an error message to the user saying what is the problem now when i call my save button submit,i do these tests on my c# before i

Zend framework and Ext-Js4, file and folder structure

僤鯓⒐⒋嵵緔 提交于 2019-12-25 01:24:37
问题 I am trying to use Zend Frame work and Ext-Js4 together. But I don't know how to setup file and folder structure correctly. I setup like this, And in application/controllers/IndexController.php $this->view->headScript()->appendFile('/js/ext-4.0.7/ext-all.js','text/javascript'); $this->view->headScript()->appendFile('/js/app.js','text/javascript'); $this->view->headLink()->appendStylesheet('/js/ext-4.0.7/resources/css/ext-all.css'); Is it right structure? anyone has a better idea? Thank you.

window not showing the updated data based on grid row double clicked

喜你入骨 提交于 2019-12-25 00:48:41
问题 I am having one grid containing all project details. This grid has its own controller, models, stores. When I double click on the grid it passes the id to my server side. Based on the id passed I execute some query to my database and then returned the data back to client in JSON format. And based on successful response I show another window, which contains all the data returned back from server to client. But the main problem is that the window popup doesn't contain the updated data. Means

How to get an ExtJs application to look like the Feed Example?

血红的双手。 提交于 2019-12-24 22:45:05
问题 In my ExtJS Applications I have 3 components, an Ext.tree.Panel , and Ext.grid.Panel and an Ext.Img . I want them to have the same layout as the Feed Viewer example here: http://dev.sencha.com/deploy/ext-4.0.0/examples/feed-viewer/feed-viewer.html I have been trying to look at the code but I am still having trouble getting my components to look like that (One component on the left, and two on the right one on top of the other). Can anyone explain how I can do this using 'Border' layout?