cancel
Showing results for 
Search instead for 
Did you mean: 

Get selected Tabstrip

Former Member
0 Kudos

Hello.

I have a TabStrip with two Tabs.

In my programm i must reset my view, and so the tabstrip is default.

how can i get the latest tab and set it after reset view?

thanks.

marcus

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi.

How can i get a reference to the tabstrip on the view???

Data: tab type ref to cl_wd_tabstrip,

stab type string value 'TAB1'.

tab->set_selected_tab( Exporting value = stab ).

alejandro_bindi
Active Contributor
0 Kudos

You can do something like this:


METHOD wddomodifyview .

  DATA: l_tabstrip TYPE REF TO cl_wd_tabstrip.

  l_tabstrip ?= view->get_element( 'YOUR_TABSTRIP' ).
...

But I must insist you should try the approach with a context attribute first instead.

Regards

Answers (2)

Answers (2)

alejandro_bindi
Active Contributor
0 Kudos

There's been a while since I last used tabstrips in WDA, but if I recall correctly, I did it getting a Tabstrip reference (CL_WD_TABSTRIP) in WDDOMODIFYVIEW, and then calling method SET_SELECTED_TAB with the name of the destination tab (type STRING).

Nevertheless I think a better alternative would be to bind the selectedTab property to a context attribute and change that in the action handler, although I'm not sure if that works.

Regards

Former Member
0 Kudos

I could not understand your question properly, but if you want to get the Active tab and then make values as defualt then you can call

GET_SELECTED_TAB method of class CL_WD_TABSTRIP to get the selected tab. It will return the name of the tab. And then you can proceed your coding for making them as default value.

Hope it works.