on 02-26-2009 4:44 AM
Hi,
I need to have 6 radiobuttons horizontally in ABAP Web Dynpro.
I got the radiobuttons on the web page,
What I have done is
For each radiobutton I have KeyToSelect binded to rb1, rb2, rb3, rb4, rb5 and rb6 (rb1, rb2, rb3, rb4, br5 and rb6 are boolean)
For each radiobutton I have SelectedKey binded to group1 where group 1 is again boolean.
My problem is if I select the 2nd radiobutton, all the others buttons gets checked, except that radio button and if I try clicking it for the second time then it is fine.
Please let me know where I am going wrong or is it that I am missing something else to do.
Thanks
Sandeep
Hi,
Try to use radiobutton group by index UI element. Have a node in the context element with cardinality 0..n and have an attribute text type string. In the properties of the node provide the supply function as "fill_the_node". Bind this node to the radiobuttongroupbyindex UI element.
In the fill_the_node method.
data : node type ref to if_wd_context_node,
elem type ref to if_wd_context_element.
data : it type table of if_view=>element_node,
wa like line of it.
wa-text = 'radiobutton1'.
append wa to it.
wa-text = 'radiobutton2'.
append wa to it.
wa-text = 'radiobutton3'.
append wa to it.
wa-text = 'radiobutton4'.
append wa to it.
wa-text = 'radiobutton5'.
append wa to it.
wa-text = 'radiobutton6'.
append wa to it.
node->bind_table( it ).
In this way you can have 6 radiobuttons on the browser.
Thanks
Mallika
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks everyone the issue is resolved
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sandeep,
You can go thru the component - WDR_TEST_EVENTS in your sap system.
That really help you a lot regarding the radio button
Regards
Manoj Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sandeep,
Try this method:
- Don't bind the keytoselect property of anu radio button with any attribute. Just give some distinct value in it for each radio button eg. for rb1 give the value as 'a' and for rb2 give 'b' and like that. give value to each radio button.
- now bind the selected key property of all the radio button with an attribute which is of string type. Give a default value to that attribute same as the keytoselect value of any radiobutton which you want to be checked when the application runs for the first time. eg. if you want that when the application runs for the first time, rb1 should be checked by default then give the default value as 'a'.
- create onselect method for each radio button and write the code accordingly.
I hope it helps.
Regards
Arjun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
You can give KeyToSelect as R1, R2,R3,R4,R5, R6 as text.
Bind the Selected Key Property to a Context Attribute of Type String.
Now you can test your application. It will work fine. You can now give any Action on Select Property of Radio buttons.
Also you can have a look at wdr_test_events Component.
Thanx.
Edited by: saurav mago on Feb 26, 2009 6:14 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
80 | |
24 | |
11 | |
9 | |
7 | |
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.