SmartClient 2012-02-08_v8.2p/PowerEdition
if I use a tabDeselected handler to prevent selecting a tab under certain circumstances, and I try also to warn the user, the tabDeselected is called everytime I click OK on the dialog.
is it a bug, or am I misusing the TabSet api?
you can try it in the showCase, modifying the #selectionEvents sample,
adding a isc.warn('Warning') in the tabDeselected handler:
if I use a tabDeselected handler to prevent selecting a tab under certain circumstances, and I try also to warn the user, the tabDeselected is called everytime I click OK on the dialog.
is it a bug, or am I misusing the TabSet api?
you can try it in the showCase, modifying the #selectionEvents sample,
adding a isc.warn('Warning') in the tabDeselected handler:
Code:
isc.Label.create({
ID:"welcomePane",
contents:"Welcome to the application",
styleName:"exampleTextBlock",
width:"100%",
align:"center"
});
isc.TabSet.create({
ID: "tabSet",
width: 400,
height: 200,
tabs: [{
ID: "welcome",
title: "Welcome",
pane: welcomePane
},{
ID: "preferences",
title: "Preferences",
tabSelected : function (tabSet, tabNum, tabPane, ID, tab) {
isc.Log.logWarn("zero" + tabPane + " null:" + (tabPane == null));
if (tabPane == null) {
isc.DynamicForm.create({
ID: "preferencesPane",
fields: [{
name: "useISCTabs",
title: "Use SmartClient tabs",
type: "checkbox",
defaultValue: false,
required: true
}]
});
tabSet.updateTab(ID, preferencesPane);
}
},
tabDeselected : function (tabSet, tabNum, tabPane, ID, tab, newTab) {
if (!tabPane.getValue("useISCTabs")) {
isc.warn('Warning');
return false;
}
}
}]
});
Comment