cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Tabstrip creation

Former Member
0 Kudos

Hi Every body ,

My requirement is i need to create tabs on tabstrip dynamically and create table on the tabs.

I am able to create tabs dynamically but i am unable to create table on the tabs . If anybody have done this let give the code . I am pasting my code also please tell me is my approach is correct or not .

Thanks in advance ,

Vijay

Edited by: Vijay vorsu on Jun 19, 2009 10:03 AM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi ,

I am adding code which i have written , please correct me where it is wrong .

l_tab = cl_wd_tab=>new_tab(

id = l_id

view = view ).

  • l_tabstrip->add_tab( l_tab ).

CONCATENATE 'CAP_' ls_tab-id INTO l_id.

CONCATENATE 'TAB_' ls_tab-id INTO ls_name.

l_caption = cl_wd_caption=>new_caption(

id = l_id

view = view

text = ls_name ).

l_tab->set_header( l_caption ).

  • Creating container

CALL METHOD cl_wd_transparent_container=>new_transparent_container

EXPORTING

  • accessibility_descr =

  • bind_accessibility_descr =

  • bind_default_button_id =

  • bind_enabled =

  • bind_height =

  • bind_scrolling_mode =

  • bind_tooltip =

  • bind_visible =

  • bind_width =

  • context_menu_behaviour = E_CONTEXT_MENU_BEHAVIOUR-INHERIT

  • context_menu_id =

  • default_button_id =

  • enabled = 'X'

  • handle_hotkeys =

  • height =

id = 'TAB_TR1'

  • is_layout_container = 'X'

  • labeled_by =

  • scrolling_mode = E_SCROLLING_MODE-NONE

  • tooltip =

view = view

  • visible = E_VISIBLE-VISIBLE

  • width =

receiving

control = cl_trans

.

CALL METHOD cl_wd_flow_data=>new_flow_data

EXPORTING

  • cell_design = E_CELL_DESIGN-PADLESS

element = cl_trans

  • id =

  • v_gutter = E_V_GUTTER-NONE

RECEIVING

control = layout

.

l_tab->set_content( cl_trans ).

CALL METHOD l_tabstrip->add_tab

EXPORTING

  • index =

the_tab = l_tab .

    • create table in tabstrip

CALL METHOD view->get_element

EXPORTING

id = 'TAB_TR1'"ls_name

RECEIVING

element = ui_element.

view_tr1 ?= ui_element .

  • getting error here

CALL METHOD cl_wd_dynamic_tool=>create_table_from_node

EXPORTING

ui_parent = view_tr1

table_id = 'TAB1'

node = lo_nd_input

  • on_lead_select =

RECEIVING

table = ui_tab.

Thanks ,

vijay

Former Member
0 Kudos

Hi,

Please check out this thread -

What is the error you are getting.

Regards,

Lekha.

Former Member
0 Kudos

Hi ,

Thanx for quick reply lekha . I am getting null access reference in the method cl_wd_dynamic_tool=>create_table_from_node , to get the layout of the parent element . But i created parent element ( transparent cantainer ) with layout only .you can check that in my code .

Is this is the way to create table ui dynamically in tabstrip .

Please help on this .

Thanks in advance ,

vijay

Former Member
0 Kudos

Hi ,

No replies for my query .

My requirement is i need to add UI elements in tab strip dynamically . I am able to create tabs dynamically on screen . After creating tabs i am trying to add other UI elements dynamically .

Pl help on this ..

Thanks in advance ,

Vijay

uday_gubbala2
Active Contributor
0 Kudos

Hi Vijai,

You had missed out on 1 step. Since you are trying to add a new container element ( i.e, transparentcontainer ) to your layout you should say as:

cl_wd_flow_layout=>new_flow_layout( container = cl_trans ).
cl_wd_flow_data=>new_flow_data( element = cl_trans ).

Right now you are just saying as:

CALL METHOD cl_wd_flow_data=>new_flow_data
EXPORTING
* cell_design = E_CELL_DESIGN-PADLESS
element = cl_trans
* id =
* v_gutter = E_V_GUTTER-NONE
RECEIVING
control = layout.

So just add the other 1 layout specification which you have missed out and it should work fine. Am re-mentioning the same for your observation below:

cl_wd_flow_layout=>new_flow_layout( container = cl_trans ).

Regards,

Uday

Former Member
0 Kudos

Hi Uday ,

Thnks alot ..

Thats solved my problem .

Points awarded ...

vijay vorsu

Answers (0)