on 09-06-2012 3:05 PM
Hello:
I am creating a webdynpro applicaiton, in which i am creating dynamic ui elements(Button, textelements, input fields etc.).
I want to delete one of the ui element which is generated dynamically in above step, by onclick action of the button create dynamically in above step.
Please help in achieving this.
Thanks,
Ratna.
Hi every UI Element has the Option
Visible or enabled.
You must define a Binding whith an context atribute for example FORMULARUI ( Typ: WDY_BOOLEAN)
And over the Method (Button klick) you can add something like this:
* get element via lead selection
lo_el_bildschirm = lo_nd_bildschirm->get_element( ).
* set single attribute
lo_el_bildschirm->set_attribute(
EXPORTING
name = `FORMULARUI`
value = space ).
Value = space or Value = ' ' meanes off
Value = 'X' means on
hope this helps
tk
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
got it work by using below sample code.
data: id type string.
*--To read id of button
id = wdevent->get_string( 'ID' ).
check wd_comp_controller->g_view is BOUND.
DATA: lr_detail_group type ref to cl_wd_group,
lt_group_children type wd_tr_uielement.
* get a pointer to the detail group
lr_detail_group ?= wd_comp_controller->g_view->get_element( 'bowled' ).
* get children of group
lt_group_children = lr_detail_group->get_children( ).
read table lt_group_children
with key table_line->id = id
transporting no fields.
if sy-subrc = 0.
***delete selected button
lr_detail_group->remove_child( index = sy-tabix ).
endif.
Thanks,
Ratna
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.