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;
    sdi.setDisclosed(isThisItemToBeDisclosed(sdi));
}

Updated on 05 August 2013: See the code snippet in the following post if you application uses customization  http://www.jobinesh.com/2013/08/revisiting-topic-programmatically.html

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.

Comments

  1. I have below structure in my page
    af:paneltab
    af:iterator->employeeVOIterator
    af:showdetailitem

    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.

    ReplyDelete
    Replies
    1. Hi Sai.. am also facing this issue. Were you able to resolve.


      Thanks

      Delete
  2. 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 ?

    ReplyDelete

Post a Comment