on 2005 Nov 04 5:40 PM
Hi All,
I have two radio buttons, RB1 and RB2 on selecing first one it should go to View1 and similarly for second button View2 how do you implement this.
Is there any tutorial exclusievly for
- Radio Buttons
- Radio buttons in Group
- Check boxe
- Check box in group
Regards,
Murali.M
Hi Murali,
Check the following link .
http://help.sap.com/saphelp_nw04/helpdata/en/86/16e13d82fcfb34e10000000a114084/frameset.htm
Hope this helps you
Regards
Rohit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rohit,
1)The code which you mentioned is abosolutely working, only thing is if click readio button, i have hard coded some text for textedit and mapped to textedit context variable that's not displaying? How to do that ?
2) Suppose if i have five radio buttons in a group how to acchive the same thing mentioned earlier
3) when to use Standard radio button, radiobuttongroup by index, radio button group by key.
4) if some one gives simple WebDynpro application for these scenario's it helps a lot
Murali
I would not use radio buttons for switching views. The main purpose of radio buttons is to represent a one-of-many selection and not to trigger actions.
Information on how-to use radio buttons in Web Dynpro is contained in the Javadoc, see
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Murali,
There is good info in the dev manual for the UI elements at: http://help.sap.com/saphelp_nw04/helpdata/en/5c/1b76bc3da0504e8b535cf3e154eaa7/frameset.htm
You can assign an action to the onSelect event of the radio buttons and fire an outbound plug in the event handler. Depending on how your page should work, you could setup a different action for each button or one action that they are both tied to.
Cindy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To my knowldge there three ways of using radio buttons
1) general radio buttons
2) Radio buttons by group by index
3) radio buttons by group by key
if i take the first case
1) there is a key to select, selected key
if i take the
Second
we have to set text value (in properties)
and third case
selected key
for my scenario which one suits better
there are two radio buttons and one text edit
if i select first one it has to display text related to that in text box similarly for second one
can some one tell me detail steps with code
releted to contexts,events ,methods i have to create
for the above scenario
Regards,
Murali
Hi Murali,
Use simple radio buttons
Go though the following steps
1)Create 4 attributes
First_att,Second_att,Selected_Key_att,TextEdit_Att
2)Create 2 radio buttons and two text views for them
3)Bind the "key to select" property of first to First_att and second to Second_Att
4)Bind the "Selected key" property to Selected_Key_att
5)Bind the TextEdit_Att to "value" property of the text edit
6)write the code in the init for assigning the values to the two radio buttons
wdContext.currentContextElement().setFirst_Att("first");
wdContext.currentContextElement().setSecond_Att("second");
If you want any one of the radio buttons to be selected by default when the page is loaded
wdContext.currentContextElement().setSelected_Key_Att(wdContext.currentContextElement().setFirst_att);
7)Create an action say "Select_Action" by clicking the actions tab
8)Bind the propety "Select" of the radio button to the "Select_Action"
9)write the code in the "Select_Action" at implementation
wdContext.currentContextElement().setTextEdit_Att(wdContext.currentContextElement().getSelected_Key_att());
Hope this helps you
Regards
Rohit
User | Count |
---|---|
66 | |
10 | |
10 | |
10 | |
10 | |
8 | |
6 | |
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.