PDA

View Full Version : Ext.Component should be Focusable


crp_spaeth
07-07-2009, 10:58 AM
The BaseClass for all Panels, Views, and so on, Ext.Component should implement focus cappabilities as the Ext.Window does.

I am currently implementing an application with a viewport instead of windows. I would like to implement a Menu that should change depending on the currently active panel.

Beside the Menu I would like to alow the User to Key shortcuts for serveral actions.

The Implementation of a focusable Component would solve the Problems descriped in the following threads as well!

http://extjs.com/forum/showthread.php?t=23880

http://extjs.com/forum/showthread.php?p=299691

http://extjs.com/forum/showthread.php?t=64477

There are many more threads related to the missing capabilities of beeng able to set focus to a Panel/Component.

A solution for the Issue may found in:

http://extjs.com/forum/showthread.php?t=30528

My Suggestion is to Add a focusEl on Component level and relay/add Focus/Active Events to the ComponentMgr Class.

What do you think about that?

crp_spaeth
07-11-2009, 09:09 AM
BTW. I already descriped this problem a while ago also with no response...
See http://extjs.com/forum/showthread.php?p=356528#post356528
*Bump*

TommyMaintz
07-11-2009, 09:37 AM
Hi,

In the examples folder of the final Ext 3.0 build you can find an example called key-feed-viewer. It links to a file in the ux folder called Focus.js. It basically does what you describe here, which is giving the ability to any Component to receive focus. It is still experimental, so if there are any issues you encounter, please let us know. I would recommend reading the source code of the Focus.js file to get a general understanding of what it does and how it works.

I hope this answers your question.

Kind regards,
Tommy