on 09-16-2008 9:41 AM
hi experts,
i have a transparent container in which i have a radiobutton group by index UI element.
i have binded its text field with a string type attribute. i want a code with the help of which i can name those radio buttoms at runtime. eg: say for first radio button i want text as' employee' and for second i want text as 'office' and like that.
thanks in advance.
Hi Arjun,
First Create the node with 0.n Cardinality and create String attribute for this node.
After that u can bind the Node's String attribute into text field of the Radiobutton group by index UI element. then U can write the following code in u r View Init Method WDDOINIT( ),
For Example :
Here Node name is radio_button , and Attribute name is name
DATA lo_nd_radio_button TYPE REF TO if_wd_context_node.
DATA lo_el_radio_button TYPE REF TO if_wd_context_element.
DATA ls_radio_button TYPE wd_this->element_radio_button.
DATA lt_radio_button TYPE wd_this->elements_radio_button.
navigate from <CONTEXT> to <RADIO_BUTTON> via lead selection
lo_nd_radio_button = wd_context->get_child_node( name = wd_this->wdctx_radio_button ).
get element via lead selection
lo_el_radio_button = lo_nd_radio_button->get_element( ).
ls_radio_button-name = 'Employee'.
append ls_radio_button to lt_radio_button.
ls_radio_button-name = 'Office'.
append ls_radio_button to lt_radio_button.
ls_radio_button-name = 'Manager'.
append ls_radio_button to lt_radio_button.
lo_nd_radio_button->bind_table( lt_radio_button ).
Regards,
Vijay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.