on 10-04-2007 10:31 AM
Hi All,
I have a radio button in my view. I bind its " KeyToSelect" and "SelectedKey" properties to 2 boolean variables. But in the output screen initially it is not selected. If I select it once ,I am unable to deselect it. How to deselect it after selecting that radio button.
Thanks in advacne.
Hi Bharath,
I have demonstrated a simple scenario which might clear the properties of the radio button.
These are the 3 preperties maily used in case of radiobutton.
KeyToSelect: Unique key which which this radio button will be identified while selection from a number of radiobutton.s
SelectedKey: This property is set to the key of the radiobutton that is currently selected.
OnSelect: An event that you want to fire when the radio button is selected.
Assume you have 2 radio button RB1 and RB2
Properties of RB1
KeyToSelect: Key_1
SelectedKey: context attribute (Ctx_SelectedKey) type String
OnSelect: Action1
Properties of RB2
KeyToSelect: Key_2
SelectedKey: context attribute (Ctx_SelectedKey) type String
OnSelect: Action2
Note: selectedKey is binded to the same context as you want to consider them as a single group.
If you want to set that RB1 should be selected by default when the application is executed.
you can write this in wdDoInit()
wdContext.currentContextElement().setCtx_SelectedKey("Key_1");
Regards,
Murtuza
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bharath,
The OnSelect action of RB is only called when the radio button is not selected and you are selecting it but once it is selected and you click on it again it won't be triggerred.
To toggle for the button you need to handle it in a seperate action for different UI element. Thus the user has to click on a different button(for eg.) to deselect the selection of the radio button and can click again the RB for its selection. No user would like an application to behave in this way and thus I suggested you to go for Checkbox instead of RB in your case.
Regards,
Murtuza
Hi Bharath,
I don't know whether this is the only way to find the version of NWDS or not but I find it by clicking on
Help-->About SAP Netweaver Developer Studio
If the version begins with <b>7.something</b> then it is 2004s and if it begins with <b>2.something</b> then it is 2004.
Regards,
Murtuza
Did you read the Javadoc?
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
OnSelect call an action
in that check if
wdContext.currentContextElement().getCurrentContextElement();
if it returns true
write
wdContext.currentContextElement().setCurrentContextElement()=true;
else set it to false;
Regards
Abhijith YS
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.