cancel
Showing results for 
Search instead for 
Did you mean: 

Order tabs on tabstrip

p_willems
Explorer
0 Kudos

Hello,

I have a requirement to order tabs on the tabstrip UI element. Is this possible.

For example: at designtime:

UI tree:

RootUIElement:

--> TabStrip

--> Tab_1

--> Tab_Header

--> Tab_Content

--> ViewContainerUIElement1

--> View_1

--> Tab_2

--> Tab_Header

--> Tab_Content

--> ViewContainerUIElement2

--> View_2

--> Tab_3

--> Tab_Header

--> Tab_Content

--> ViewContainerUIElement3

--> View_3

--> Tab_4

--> Tab_Header

--> Tab_Content

--> ViewContainerUIElement4

--> View_4

--> Tab_5

--> Tab_Header

--> Tab_Content

--> ViewContainerUIElement5

--> View_5

It is possible to change the order of Tab_1 with Tab_2, Tab_3 with Tab_5 or Tab_4 with Tab_1.

Regards,

Patrick Willems

Accepted Solutions (1)

Accepted Solutions (1)

siarhei_pisarenka3
Active Contributor
0 Kudos

Hi Patrick

Ya.. sure... The order is determined exactly as you see it in the view editor on design-time. If you switch over two tabs inside the tab-strip it'll affect run-time too.

BR, Sergei

p_willems
Explorer
0 Kudos

Hi Sergei,

I know this is possible in design-time.

Maybe my question was not clear enough.

Can It also be switched at runtime. Or can I put the order in the context and use that.

Regards,

Patrick Willems

siarhei_pisarenka3
Active Contributor
0 Kudos

Hm.. The first idea come to me is the following. You can switch over two UI controls on run-time, programmatically. If you have a knowledge about Webdynpro API and how to create UI controls dynamically you can easily implement the switching.

In wdDoModifyView method just get the first Tab control, the second one and switch them over. You can use the following API exposed by interface IWDTabStrip:

IWDTab removeTab(int index);
void addTab(IWDTab tab, int index)

BR, Sergei

Former Member
0 Kudos

Say you have created tabs "Tab1", "Tab2", "Tab3" at design-time and you want to have them at runtime as "Tab2", "Tab1", "Tab3" at runtime (easily generalizable to arbitrary permutation).

You can do that with code like this in wdDoModifyView():


IWDTabStrip tabStrip = (IWDTabStrip) view.getElement("tabStripID");
IWDTab[] tabs = tabStrip.getTabs();
tabStrip.removeAllTabs();
tabStrip.addTab(tabs[2]);
tabStrip.addTab(tabs[1]);
tabStrip.addTab(tabs[3]);

The question is: why is tab strip order important?

Armin

p_willems
Explorer
0 Kudos

Hi Armin,

To answer your question (why is tab strip order important?):

We making a product with webdynpro. The tabstrip represents a standard process flow. To be flexible with companies who has a different process, the positions of the tabs must be flexible. This is customization on the backend.

Greetings,

Patrick Willems

Former Member
0 Kudos

That was exactly why I asked. For visualizing sequential processes you should better use a RoadMap or PhaseIndicator. The TabStrip by definition represents a random-access and not a sequental access UI element.

Armin

p_willems
Explorer
0 Kudos

Hi Armin,

We use it on a PDA. Are the UI elements "RoadMap" or" PhaseIndicator" available on the PDA.

We use sap-wd-client=Pie03Client?

Regards,

Patrick Willems

Former Member

Answers (0)