25 May 2011

When disclosureListener of a panelTabbed's showDetailItem is fired?

Interestingly enough someone would expect that the disclosureListener of the tab that was clicked/selected would only be fired/kicked off. This is not true though as described in one more very good post (in Greek) by Serafim Karapatis.
What really happens is that the disclosureListenerof all tabs (panelTabbed's showDetailItems) will be fired. And in order to resolve which tab was selected, you should use disclosureEvent.isExpanded()method.

public void tabSelected(DisclosureEvent disclosureEvent) {
   if (disclosureEvent.isExpanded()) {

Please check also the documentation of showDetailItem.

1 comment:

You might also like:

Related Posts Plugin for WordPress, Blogger...