on 10-01-2008 4:33 PM
Hello..
I was playing around the UI elements of web dynpro . I want to display three radio buttons on the screen for three colors and after that I have a submit button below it.
Later on I will write some logic under the button submit onaction method, but for now I am struggling with the radio button.
I have added RADIOBUTTONGROUPBYINDEX element to my layout and I see the three radio buttons added without any captions. I got stuck here. How to give the captions to the radio button ?
Thanks for your time.
Peeru.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Indrani,
Create a Node (like RBGRP) with cordinality 0..n and add Attribute(like TEXT1) in context with STRING type.
For RBGRP provide supply function name example (FILL_DESCRIPTION).
add the texts to internal
check below code ..
method FILL_DESCRIPTION .
General Notes
=============
A common scenario for a supply method is to aquire key
informations from the parameter <parent_element> and then
to invoke a data provider.
A free navigation thru the context, especially to nodes on
the same or deeper hierachical level is strongly discouraged,
because such a strategy may easily lead to unresolvable
situations!!
if necessary, get static attributes of parent element
DATA ls_parent_attributes TYPE wd_this->element_context.
parent_element->get_static_attributes(
IMPORTING
static_attributes = ls_parent_attributes ).
*
data declaration
DATA lt_rbgrp TYPE STANDARD TABLE OF IF_MAIN=>Element_rbgrp.
DATA ls_rbgrp LIKE LINE OF lt_rbgrp.
@TODO compute values
e.g. call a data providing FuBa
ls_rbgrp-TEXT1 = 'Button1'.
INSERT ls_rbgrp into table lt_rbgrp.
ls_rbgrp-TEXT1 = 'Button2'.
INSERT ls_rbgrp into table lt_rbgrp.
ls_rbgrp-TEXT1 = 'Button3'.
INSERT ls_rbgrp into table lt_rbgrp.
bind all the elements
node->bind_table(
new_items = lt_rbgrp
set_initial_elements = abap_true ).
*
endmethod.
///Happy coding.
Kiran Singh
hi,
please go through this standard example
WDR_TEST_UI_ELEMENTS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The following document may help you.
or check the standard demo Program.
WDR_TEST_EVENTS
Thanks,
Sree.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
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.