cancel
Showing results for 
Search instead for 
Did you mean: 

How to Get the Tabstrip name

Former Member
0 Kudos

Hello,

i have a tabstrip UIelement and i want know which method will be generated each time when i am clicking on the next tabstrip;

exampl;

Tab1 Tab2 Tab3 Tab4

so, if i am clicking or changing from Tab2 to Tab3 and back to Tab2 there mußt be a way that i can know which tabstrip is generated, WDDOMODIFYVIEW will be generated only the first time, but after that i dont know which method will be generated , i used for this the method GET_SELECTED_TAB to get the name of the tabstrip

thank you all

Accepted Solutions (1)

Accepted Solutions (1)

gill367
Active Contributor
0 Kudos

the tab strip UI element has an action called "Onselect".

everytime you change the tab it will be trigged.

and tabstrip has a property called slected tab

bind this property to an attribute in the context and then in the action eventhandler of OnSelect

check the value of this attribute.

it will have the selected tab's name .

thanks

sarbjeet singh

Former Member
0 Kudos

Saarbjeet, if i am not wrong the selected tab would return the TAB id and not the name (Header text ).

I think for requirement, i would save the tabStrip instance in the wddomodifyview and on action of an event , get the tab from the tabStrip and from tab get the Header.

Answers (2)

Answers (2)

praveen_reddy2
Active Participant
0 Kudos

DATA tab TYPE string.

Tab = wdevent->get_string( 'TAB' )...

In Tab u will get the selceted tab name.

Check it out once..

Former Member
0 Kudos

hello all,

i created a get_tab as an action, and i bind it to the table Ui element ( also i bind it to an attributes in the context), and i set up a break point in the method onactionget_tab, but this method was not detected each time when clicking on the other subtables !!!

gill367
Active Contributor
0 Kudos

why are you binding the get_tab to the table UI element.

what is your actual requirement.

how is the screen designed.

on_select action of tab will be triggered everytime you select a tab.

there in that action you can get teh selected tab's id.

thanks

sarbjeet singh

Former Member
0 Kudos

my requirement is to get which method will be triggred each time clicking on a new tabstrip, and as i said, i bind on_select to a method and set up a break-point in this method, but after clicking each time on the other tabstrips, this breakpoint was not detected.

BR

Former Member
0 Kudos

HI,

On Select of TABSTRIP will trigger when you click on any of the tabs of a given tabstrip.

If you have 1 or more tabstrips, you wanted to know which tabstrip is clicked...MODIFYVIEW will get triggered. there is a parameter VIEW of type if_wd_view. Please use this to get the tabstrip name.

On_Select is specific to tabstrip.

And one more thing, If you have clicked any tab of a given tabstrip, there also you can get the TABSTRIP name. Usually the TAB name will be refereced by TABSTRIP.TAB name right. Using this also you can get to know.

Former Member
0 Kudos

Hi,

thank you for your replay

<<On Select of TABSTRIP will trigger when you click on any of the tabs of a given tabstrip.>>

this didnt work with me, and i am asking if i need to do something eles to make it work?

thank you

Former Member
0 Kudos

ok, thank you, i've just seted an other break-point in modefyveiw and it works mow, thank you for your help

gill367
Active Contributor
0 Kudos

Onselect and wddomodify

both will be trigred each tiem you click on any other tab.

that is when you change the tab.

i guess you need to check ur breakpoint .

thanks

sarbjeet singh

Former Member
0 Kudos

Hi Scafandri ,

In your tabstrip UIelement you will get a action 'on Select' . Create a action. You will get three import parameter in your action name WDEVENT.

Now do the following coding :-

DATA TAB TYPE STRING.

  • display the value of the tab event parameter

TAB = WDEVENT->GET_STRING( 'TAB' ).

Now in the attribute TAB you will get the ID of the selected tab i.e. which tab you have selected.

I think this will solve your query.

Regards,

Monishankar C