extjs3

Ext JS - How to Scroll to bottom of Textarea

梦想的初衷 提交于 2019-12-22 10:15:35
问题 This is my code below. How can I scroll to bottom of textarea? It must be something like Ext.getCmp('output').setScrollPosition(Ext.getCmp('output').getScrollHeight()); Here is my code for the textarea: var myWin= new Ext.Window({ height : 340, title : 'CHAT', modal : true, resizable : false, draggable : false, closable : false, width : 477, layout : 'absolute', bodyStyle : 'padding : 10px', buttonAlign : 'center', items : [ { id : 'output', xtype : 'textarea', width : 216, readOnly : true,

ExtJS 'datefield' validation override

旧巷老猫 提交于 2019-12-22 10:05:29
问题 I needed a datecolumn with some custom behaviour, specifically I needed to be able to enter in a date or and age in the same field (with an age staying rendered as an age and a date staying rendered as a date) Eg. Entering "23" will leave "23" in the field as a valid value, or entering "22/1/88" will leave "22/1/88" as valid value. So I tried having a datecolumn with the editor defined like this (note the validate override): editor: { xtype: 'datefield', format: 'd/m/Y', validate: function(){

Password masking as in mobiles using js

无人久伴 提交于 2019-12-21 20:23:18
问题 Can any one suggest to build a password field that behaves the way passwords are entered using iphone? When I enter some character, it should be visible to the user for a second and then it should turn to *. But I need to get the value from the field when I submit the form. Its an ExtJs text field. Is there any plugins available for this? Any help on this will be helpful. 回答1: Probably, this can help you: http://blog.decaf.de/2009/07/iphone-like-password-fields-using-jquery/ 回答2: Check out

check child nodes of a tree when a parent is clicked [ExtJS]

我的未来我决定 提交于 2019-12-21 10:04:35
问题 I would like to know how can i check the sibling nodes of a tree while clicking on a particular node in ExtJs. I had given id's for each node and i can access the id of a clicked node. then how can i proceed to checking the child nodes automatically ?? somebody please help me.. 回答1: // or any other way of getting hands on the node you want to work with var node = treePanel.getNodeById('your-id'); node.eachChild(function(n) { n.getUI().toggleCheck(true); }); If you want this to work on the

check child nodes of a tree when a parent is clicked [ExtJS]

女生的网名这么多〃 提交于 2019-12-21 10:04:22
问题 I would like to know how can i check the sibling nodes of a tree while clicking on a particular node in ExtJs. I had given id's for each node and i can access the id of a clicked node. then how can i proceed to checking the child nodes automatically ?? somebody please help me.. 回答1: // or any other way of getting hands on the node you want to work with var node = treePanel.getNodeById('your-id'); node.eachChild(function(n) { n.getUI().toggleCheck(true); }); If you want this to work on the

ExtJS 3: Two ways of creating custom class: what's the difference?

寵の児 提交于 2019-12-21 07:34:01
问题 I'm trying to learn ExtJS and object-oriented JavaScript in general. I've seen people defining classes in custom namespaces in a couple of ways. What's the difference between these two methods? Method 1 Ext.ns('myapp.cars'); (function(){ var Car = Ext.extend(Object, { //... }) myapp.cars.Car = Car; })() Method 2 Ext.ns('myapp.cars'); myapp.cars.Car = Ext.extend(Object, { //... }); Method 2 is easier to read and requires less code; is there any reason Method 1 is better? Thanks! 回答1: It's

How do I force the display of a decimal in an ExtJS NumberField to a certain precision?

非 Y 不嫁゛ 提交于 2019-12-17 22:54:16
问题 I have a form with a NumberField that gets values of type float from JSON. If the values happen to be whole numbers, then no decimal places are shown. I would like to show 2 decimal places at all times. Is there a config option for this? Here's my declaration: items: [ { fieldLabel: 'Net Sales', name: 'netSales', allowBlank:false, decimalPrecision:2 }, 回答1: either extend : var myNumberField = Ext.extend(Ext.form.NumberField, { setValue : function(v){ v = typeof v == 'number' ? v : String(v)

Horizontally Scrollable Grid in ExtJS 3.3

天涯浪子 提交于 2019-12-13 18:45:07
问题 I'm new to ExtJS and am having hard time accommodating a large number of columns in a 600px wide Ext.grid.EditorGridPanel (see example below). Scrolling all grid columns together or something similar to the second grid shown in this example (Ext 4) would do it. var grid = new Ext.grid.EditorGridPanel( this.getGridConfig('', ['a', 'b', 'c', '...', 'x', 'y', 'z'], [ { dataIndex: 'a', header: 'A', editor: new Ext.form.TextField({width: 200, allowEmpty: false}) }, { dataIndex: 'b', header: 'B',

charts won't draw with extjs 3.4

柔情痞子 提交于 2019-12-13 18:07:10
问题 A simple problem, really simple code, i just copy/paste the code example, on my local project of course, but no charts drawing ... i really don't understand what's happening, i change in doubt url of the swf on my local folder, same problem, please help ! <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Charts v1.0</title> <link rel="stylesheet" type="text/css" href="css/ext-all.css" rel="stylesheet" /> <script type="text/javascript" src="js/ext-base

How do I disable a control in an ExtJS grid?

人走茶凉 提交于 2019-12-13 15:24:57
问题 I am using ExtJs 3.4. I have a checkbox control in an ExtJs Grid. I want to disable the checkbox control based on when a value in the store is equal to zero. I have tried this and it does not disable it: var colModel = new Ext.grid.ColumnModel( { columns: [ { id: 'AircraftOid', header: "AircraftOid", width: 100, sortable: true, locked: true, dataIndex: 'AircraftOid', hidden: true }, { id: 'nNumber', header: "N-#", width: 100, sortable: true, locked: true, dataIndex: 'NNumber' }, { header: