Skip to content

How to programmatically select a Tab in a TabbedPanel

februari 6, 2011

Most solutions I see are based on a value of a sessionScope variable that is used in the All Properties\basic\selectedTab property of the TabbedPanel Control. I was facing the problem of loosing data when I afterwards switched manual between the tabs.

This problem can be solved by using the appropriate Xsp class: com.ibm.xsp.component.xp.XspTabbedPanel. This class inherits the setSelectedTab method from its parent UI class.

Here is my solution (click event in a Button Control under Tab 1):

var tabbedPanel:com.ibm.xsp.component.xp.XspTabbedPanel =
                                         getComponent("tabbedPanel1");
tabbedPanel.setSelectedTab("tabPanel2");

If you want to do a Partial Update, you should place the TabbedPanel Control within a Panel Control, and define its id under Selected Element…

Want to learn more: XP852 – Lotus Domino Designer 8.5.2 Basic XPage Applications

No comments yet

Geef een reactie

Vul je gegevens in of klik op een icoon om in te loggen.

WordPress.com logo

Je reageert onder je WordPress.com account. Log uit / Bijwerken )

Twitter-afbeelding

Je reageert onder je Twitter account. Log uit / Bijwerken )

Facebook foto

Je reageert onder je Facebook account. Log uit / Bijwerken )

Google+ photo

Je reageert onder je Google+ account. Log uit / Bijwerken )

Verbinden met %s

%d bloggers op de volgende wijze: