on 05-12-2006 12:29 AM
Hello,
In my action handler method I have an ID of the element that triggered this event, lets call it ELEMENT_A.
I need to get UI element (let's call it container_element) that contains ELEMENT_A.
I know that this container_element is type of cl_wd_transparent_container.
How can this be done?
Thank you.
Hi Georgy,
You could get reference to the UI element and then use GET_PARENT method to get the container. Ofcourse, you should use VIEW for this.
I have successfully used the following code to get refernce of a dropdown in a table. On similar lines, I guess you could get the container refernce.
data wd_table_cell_editor type ref to cl_Wd_view_element.
data wd_table_column type ref to cl_wd_table_column.
wd_table_cell_editor ?= wd_this->m_view->get_element( ID ).
wd_table_column ?= wd_table_cell_editor->get__parent( ).
DATA: THE_TABLE_CELL_EDITOR type ref to CL_WD_DROPDOWN_BY_KEY,
dropdown_value type string.
THE_TABLE_CELL_EDITOR ?= wd_table_column->GET_TABLE_CELL_EDITOR( ).
CALL METHOD THE_TABLE_CELL_EDITOR->GET_SELECTED_KEY
EXPORTING
CONTEXT_ELEMENT =
CONTEXT_NODE_PATH_NAME =
RECEIVING
VALUE = dropdown_value.
.
I have declared M_VIEW as an attribute(TYPE REF TO IF_WD_VIEW) in my view and used the following code in WDDOMODIFYVIEW method.
if first_time = abap_true.
wd_this->m_view = view.
endif.
Regards,
Srini.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.