Quite common requirement is to execute some logic when navigating between tabs in ADF application. Luckily in ADF there is a straight forward feature enabling you to do this easily. Its enough just to add disclosureListener to showDetailItem of panelTabbed component and point it to dedicated bean method. Like this:
<af:panelTabbed position="above" id="pt1"> <af:showDetailItem id="tab1" text="Tab Label 1"/> <af:showDetailItem id="tab2" text="Tab Label 2" disclosureListener="#{MyBean.onTabDisclose}"/> </af:panelTabbed>
Listener method signature must contain DisclosureEvent parameter:
public void onTabDisclose(DisclosureEvent disclosureEvent) { System.out.println("You've just disclosed a TAB!"); }
Tiny sample application can be downloaded here.
ADF Version 12.2.1.0.0
Hi Danas,
Can we associate two methods to the same and single DisclosureListener??
Hi Latheef,
sorry for such a long gap in response, just didn’t notice your comment notification on time. Anyway, if I understand the question correctly – we can’t associate two methods directly. But there should be no problem to wrap any splitted logic under single event listener method. Like this:
Kind Regards,
Danas