on 02-21-2006 10:35 AM
Hello all,
I want to use a group of Radio-Buttons in my Webdynpro. If I use the element RadioButtonByKey it will shown three Radiobuttons, how can I use them? I think I have to bind every Radiobutton on an seperate Context-Attribut. But I didn´t know can I do this. And why there are always three Radio-Buttons? I need only two. Is there anywhere a Tutorial which describes the handling of the Radio-Buttons?
Kind regards
Axel
Hello Axel,
did you have a look at the examples in the system? In SE80 <i>Web Dynpro Component/Intf</i> WDR_SELECT_OPTIONS and then there are the views Radiobutton, RadiobtnGrpByIdx and RadiobtnGrpByKey.
Regards, Heidi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Axel,
if u need two radio buttons then insert child of type radio button .here is th simple example for creating and binding the buttons to selction key.
Example:
Assume that u r having 2 Radio buttons R1 and R2.
For this u create 3 attributes R1,R2 and Sel.
For the radio button R1:
set the element properties as:
keytoselect---R1
selected key --Sel
For the radio button R2:
set the element properties as:
keytoselect---R2
selected key --Sel
In implementation part :
public void wdDoInit()
{
//@@begin wdDoInit()
wdContext.currentContextElement().setR1("Pass");
wdContext.currentContextElement().setR2("Fail");
wdContext.currentContextElement().setSel("Pass");
//@@end
}
SO from the above code the default radio button R1 will be enabled.
If u want the second radio button to be default then change sel to
wdContext.currentContextElement().setSel("Fail");
so during run time when u select the first one automatically its selvalue changes according to the radio button's value.
*****Points Please......
Regards,
Krishnam Raju.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Heidi,
thank you for your answer. I had a look at this WebDynpro. But I didn´t know how can I change the labels of the radio buttons?
Kind regards
Axel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Axel,
The RadioButtonGroupByKey only visualizes itself to have 3 radio buttons in the workbench. You need to bind attribute selectedKey to a context attribute. The domain values (or a self-defined value set) of the type of that attribute defines how many radio buttons are shown.
In contrast to that RadioButtonGroupByIndex uses the context elements of a particular node to display the radio buttons. Just bind attribute texts to a context attribute of a multiple node (one with cardinality 0..N or 1..N).
There are examples in component WDR_TEST_EVENTS. Just copy the view you need to your component.
Best regards,
Thomas
Hello Valery,
thank you for your answer, but I didn´t know what you mean. I have made an Attribut with type f and this Attribut is bind to the group of checkboxes. But if I start the application, the checkboxes are not shown.
Kind regards
Axel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Axel,
You need only one attribute, but this attribute must have enumeration.
Create your own simple type (on WD perspective, select Dictionary / Local dictionary / Simple Types in project tree), on second tab of type editor populate enumeration entries.
VS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
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.