How to open first tab in panelTabbed

Problem Statement – I have one scenario where,

There is one JSPX

it has one command button and a popup

popup has one taskflow dropped as region

taskflow has a PanelGroupLayout which has a panelTabbed component with 3 showDetailItems.

I open this popup, select tab2 and close. When i re-opn it for 2nd time it still displays, Tab2 as selected.

Solution – 

1. Create one bean mapped with JSPX.

2. in popup on popupCanceledListener invoke “#{backingBeanScope.testBean.testInitialize}

3. write this code in bean,

public void testInitialize(PopupCanceledEvent popupCanceledEvent) {
// Add event code here…
System.out.println(“Called cancelled”);

and it is done.

JSFF Code – 

<?xml version=’1.0′ encoding=’UTF-8′?>
<jsp:root xmlns:jsp=”; version=”2.1″
<af:panelGroupLayout id=”pgl1″>
<af:panelTabbed id=”pt1″ dimensionsFrom=”disclosedChild”>
<af:showDetailItem text=”showDetailItem 1″ id=”sdi1″ disclosed=”true”/>
<af:showDetailItem text=”showDetailItem 2″ id=”sdi2″ disclosed=”false”/>
<af:showDetailItem text=”showDetailItem 3″ id=”sdi3″ disclosed=”false”></af:showDetailItem>


<af:form id=”f1″>
<af:commandButton text=”commandButton 1″ id=”cb1″
<af:showPopupBehavior popupId=”p1″ triggerType=”action”/>
<af:popup id=”p1″ contentDelivery=”lazyUncached” childCreation=”deferred”
<af:panelWindow title = “test” id=”pw” closeIconVisible=”true”>
<af:region value=”#{bindings.taskflowdefinition1.regionModel}”

Find Attached JDeveloper Project – 

Right Click below “code” image and “Save As” to your local disk.

Change file extension from “.png” to “.zip” and extract.

Open Project in JDeveloper and run. (JDeveloper has been used to develop this project.)




    1. Hi Swathi,

      This code is perfectly fine. For your convenience I have created a JDeveloper Application using this code and added to the post.

      Hope it helps.

      Don’t hesitate asking if you face further challenges.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s