on 01-31-2012 5:27 AM
I am getting a runtime error in wddomodifyview
I want to set the layout of 'rootuielementcontainer' to Matrix layout and then add 2 UI elements ....one button and one textview with Matrix head data so that they start in a new line....
I have written the following code
if first_time = 'X'.
lr_container ?= view->get_element( 'ROOTUIELEMENTCONTAINER' ).
lr_matrix = cl_wd_matrix_data=>new_matrix_data( element = lr_container ).
lr_textview = cl_wd_text_view=>new_text_view( view = view
text = 'Welcome to Dynamic Layout Design' ).
lr_matrix_head = cl_wd_matrix_head_data=>new_matrix_head_data( element = lr_textview ).
lr_textview->set_layout_data( lr_matrix_head ).
lr_container->add_child( lr_textview ).
lr_button = cl_wd_button=>new_button( view = view
text = 'Create Button'
on_action = 'CLICK' ).
lr_matrix_head = cl_wd_matrix_head_data=>new_matrix_head_data( element = lr_button ).
lr_button->set_layout_data( lr_matrix_head ).
lr_container->add_child( lr_button ).
Error -
Adapter error in &VIEW_ELEMENT_TYPE& "_02" of view "Z_DYNAMIC.MAIN": LayoutData type "MATRIX_HEAD_DATA" for chile element "_04" is not permitted
sloved myself
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Srinivas,
This error occurs when the layout of the ROOTUIELEMENTCONTAINER is different than the one specified for the element in the code.
For example: say, in the frontview layout u are defining the layout of ROOTUIELEMENTCONTAINER as flowlayout but in code if u r trying to use the element according to matrix layout, like:
lr_matrix = cl_wd_matrix_data=>new_matrix_data( element = lr_container ).
this wont work.
Both the layouts of ROOTUIELEMENTCONTAINER & element in code must be the same.
Hope this helps.
Regards,
Azhar.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.