PDA

View Full Version : ExtJS 4.2.1: textarea tooltip is not working



samiset
4 Mar 2015, 12:20 PM
Following is the code fragment:

Ext.require(['*']);

Ext.onReady(function() {
Ext.tip.QuickTipManager.init();

var ta = {
xtype: 'textarea',
tooltip: 'Doc ID: ',
...
} ;
...
});

var docId = '...'; // got it from the record selection from the grid
var ta = '...'; //locate from Ext.ComponentQuery.query(...), this works fine.
ta.tooltip = 'Doc ID: ' + docId;

While debbuging (from firebug), I cannot see the attribute tooktip get updated.

I tried different ways after going through other people's blog & google search and nothing works. Also, I tried the way the sample program does (http://docs.sencha.com/extjs/4.2.1/#!/example/qtips/qtips.html) which also didn't work for me.

Any help is appreciated!

samiset
4 Mar 2015, 12:39 PM
Now, after refreshing browser, I can see the value changes for ta.tooltip (as = Doc ID=3769 and it changes for every record selection from the grid). But it does not render or show on mouse over or on top of the textarea which is part of tabpanel.

samiset
4 Mar 2015, 3:44 PM
Ext.require(['*']);

Ext.onReady(function() {
Ext.tip.QuickTipManager.init();

var ta = {
xtype: 'textarea',

tabConfig: {
tooltip: {
title: 'Document ID:', // optional, but looks like to have title
width: 100, height: 20,
text: ' initial text '; // will be passed dynamically a record on the grid is selected
}
} // end of tabConfig.
...
} ; // end of var ta
...

//Now, find the doc ID from the grid once user makes record selection.

var docId = '...'; // got it from the record selection from the grid
ta.tabConfig.tooltip.text = docId; //from FIREBUG, noticed that this works fine.
}); //end of onReady().

From Firebug, with breakpoint, I can see that new docId is updated to ta.tabConfig.tooltip.text object. When I hover the mouse on ta (textarea), as an item added to tabpanel, shows the tooltip (a small window) with title "Document ID" and the text "initial text" (it supposed to show the new docId added, but does not).

Any help is appreciated!
Thanks ~SS