PDA

View Full Version : howto force display field validation when switching tabs



rich71
20 Jul 2010, 8:20 AM
Hi,

I have a problem with field validation in a tabbed panel.
When switching to a tab other then the one that is displayed on initialization,
the validation is not visible at first.

This only happens after the textfield get's focus by clicking in it.

In another post I read something about setting hideMode:'offsets' for the tab,
but that did not work.


How can I force the display off field validation when a tab get's activated?

EDIT:
I CAME UP WITH THIS.
BY USING THE CASCADE FUNCTION IT CAN ALSO REACH THE TEXTFIELDS IN DE FIELDSETS.


Ext.getCmp('aanMakenGebruikerTabPanel').on('tabchange',function(tabPanel,tab){
AanMakenGebruikerWindow.syncShadow();
tab.cascade(function(item) {
if (item.isFormField) {
item.validate();
}
});

});

Thanks, Richard