Programmatically disclosing a ShowDetailItem in a <af:panelTabbed>

In this post I'm sharing an example illustrating the programmatic disclosure of <af:showDetailItem> which is added inside a <af:panelTabbed>. Please note that while programmatically disclosing a showDetailItem, it's your responsibility to set the 'Disclosed' to false for the previously displayed item. To illustrate this, take a look at the following code snippet:

RichPanelTabbed richPanelTabbed = getPanelTabbed();
for (UIComponent child : richPanelTabbed.getChildren()) {
    RichShowDetailItem sdi = (RichShowDetailItem)child;

Updated on 05 August 2013: See the code snippet in the following post if you application uses customization

You can download the sample workspace from here.
[Runs with Oracle JDeveloper 11g R1 PS2]

How to run this sample?

Run the test.jspx. This page displays drop down list displaying the tab names and a button close to it for disclosing  the selected tab programatically.


sai_explorer said…
I have below structure in my page

On click of add button, a new emp record is inserted and corresponding tab is reflected on page but not able to disclose this new tab among others.

Radamanthys17 said…
excellent thanks for the code
Srinivas Jilla said…
Hi Sai.. am also facing this issue. Were you able to resolve.

young zang said…
Is this possible ?
Tab 1 is now invisible, but now there is contextual event fired for it. Could it receive the event and response properly ?


The views expressed on this blog are my own and do not necessarily reflect the views of my employer.