Skip to main content

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 ?

Popular posts from this blog

How to set Bind Variable Values at runtime ?

In this post I'm sharing a couple of approaches for programmatically setting bind variables values at run time. This post is an attempt to explain 'When to use what ?'[ In case if you are familiar with 'Bind Variables' in ADF BC, please refer Section 5.10, Working with Bind Variables in Fusion Developer's Guide ]

1. Set the Bind Variable value using RowSet::setNamedWhereClauseParam(...)

You can use use the setNamedWhereClauseParam(...) method on the ViewObject interface (which extends oracle.jbo.RowSet) to set the value for bind variables. Please note this sets the value on default RowSet. In other words, this doesn't have any effect on the secondary RowSets that you/system generates.
ViewObject vo = am.findViewObject("EmployeesView1"); vo.setNamedWhereClauseParam("bindVarDeptId", new Number(10)); vo.executeQuery();
2. Set the Bind Variable value using ViewObject's VariableValueManager::setVariableValue(...)

VariableValueManager Ma…