on 07-13-2009 12:48 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
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
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.