cancel
Showing results for 
Search instead for 
Did you mean: 

WD- Tabstrip have to make first tab as default tab

vijay_vikram2
Explorer
0 Kudos

Hello ,

I have used TAB STRIP and it has 4 tabs(TAB1 , Tab2 , tab3, Tab4). Always when we open application , Tab4 is getting displayed first.

I need to set it has it needs to display TAB 1 has default tab and it should display first when i launch an application.

Please let me know the way.

Thanks

Vijay

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

Hello Vijay,

You can set the default tab by using selected tab feature of the TABSTRIP UI element.

Please reward if useful.

Thanks,

Varuna

vijay_vikram2
Explorer
0 Kudos

Hello Varuna,

It means to say bind the context string attribute and set this attribute value as default tab value

.

Thanks
vijay

Former Member
0 Kudos

hi Vijay,

I think you are close; check the below code you can set default in wddoINIT method.

   DATA lo_el_context TYPE REF TO if_wd_context_element.

   DATA ls_context TYPE wd_this->element_context.

   DATA lv_tab TYPE wd_this->element_context-tab.  " Data type String

* get element via lead selection

   lo_el_context = wd_context->get_element( ).

* @TODO handle not set lead selection

   IF lo_el_context IS INITIAL.

   ENDIF.

* @TODO fill attribute

   lv_tab = 'TAB_1'.          " My tab name i wanted to set as default

* set single attribute

   lo_el_context->set_attribute(

     name `TAB`          " My tab strip name

     value = lv_tab ).


hope this will help.

vijay_vikram2
Explorer
0 Kudos

Hello Kiran,

Instead of coding, I can set the default value in the context value has the Tab name .

Will that work as the above one you mentioned?

thanks

Vijay

0 Kudos

Hello Vijay,

You no need to code and bindings as well.

Just use SELECTED TAB property put TAB_1 or TAB_2 or 3 4 etc ( what ever tab you want to display as default).

also, ( Using binding)

Create a context attribute of type string and bind it to tab strip ui element "selected tab" property.

Populate this attribute with your required tab name ( TAB_1) in WDDOINIT method .

Regards,

Paul.