PDA

View Full Version : Next Field focus issue



robertoroberto
26 Aug 2009, 5:27 AM
Hi

I have a TabPanel with "n" panel.
When the use push the "tab" button, of couse the focus go to the next element (usually the next field).
But when the focus reach latest field in the active tab, instead to go (and so switch automtically) on the first field of the next tab, it go to others elements.

I believe that all users (e.g. an ERP user) will found a feature to switch automatically to the next tab (using tab button....) very very useful.

Maybe this feature already exists on ExtJS directly or with some plugin....
ANyone know it ?

Of course I can write it myself

It is necessary to know bind a function to the Ext.EventObject.TAB
This function should know who is the target...
check what is the next focusable element (field) according the html tree (maybe indextab) and if between the target and the next focusable field there is a panel (into a tab) it should activate it.....

Thanks

robertoroberto
26 Aug 2009, 9:59 PM
Hi..
Nobody just fall into this requirement/feature?

pyrrhon
10 Sep 2009, 6:23 AM
I need this feature too ! And I also want the Field.focus() function to activate the tab the field is nested into.

bbg
1 Oct 2009, 9:12 PM
I've not seen anything alike. It'll be a great feature if it be. I try to implement it on my own but there are many obstacles.

Animal
1 Oct 2009, 9:36 PM
Intercept the Field initComponent to bubble the focus event/

Add a focus listener to the TabPanel. When you catch a bubble focus event, from a Field, get the Field's tab (using findParentBy), and activate it. Simples.