on 01-04-2010 6:28 AM
Hi gurus,
I m creating an application where there are 2 radio buttons.
When 1 radio button is clicked i want a new view to appear and when the other is clicked i want another view to appear.
How to begin with this?
Thanks
Sohil
hi ,
1 create two views and embed them in the same window in which is ur view that contains ur 2 radio buttons
2 create a Action for click of ur radio button , in the OnAction property of ur radio button , switch to the next view
for navigation , u do like this :
1 Outbound Plug: Define outbound in ur initial view , tosecond for ur 2nd view
2 create Inbound plug for ur destination view , suppose , fromfirst
3 now in OnActionMethod of ur radio , fire the plug
wd_this->fire_tosecond_plg( ) .
4 in ur windows , right click on ur initial view , choose create navigation link and choose the inbound plug of ur 2nd view
refer the basic articles of navigation between views on SDN
regards,
amit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi gurus...
The previuos problem is solved but now stuck up with another problem.
In my application i have kept both the radio buttons unmarked.
When i come back to the main view from view 1, there is one of the 2 radio buttons marked.
but i want both the radio buttons unmarked.
How can i do that??
Thanks
Sohil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Check the standard componeent to know the usage of Radiobuttons : wdr_test_events.
Implement the OnSelect Action of Radiobutton and open the new View.
Embed new View in a Window and open the window on the click of radiobutton.
Code for your referecne to open new window :
DATA: lo_component_api TYPE REF TO if_wd_component,
lo_window_manager TYPE REF TO if_wd_window_manager,
lo_popup_window TYPE REF TO if_wd_window,
lv_otr TYPE string.
" get window-manager by api
lo_component_api = wd_this->wd_get_api( ).
lo_window_manager = lo_component_api->get_window_manager( ).
lv_otr = cl_wd_utilities=>get_otr_text_by_alias( alias = 'PTRM_WEB_UI/ENTER_ENTMNT_DETAILS' ).
lo_popup_window = lo_window_manager->create_window(
window_name = 'ENTMNT_WINDOW'
title = lv_otr
close_in_any_case = abap_false " cancel action in entertainment_view
close_button = abap_true
default_button = if_wd_window=>co_button_ok " Subscribe OK in entertainment_view
button_kind = if_wd_window=>co_buttons_okcancel
).
lo_popup_window->open( ).
'ENTMNT_WINDOW' is name of Window in which new View is embedded.
Edited by: Saurav Mago on Jan 4, 2010 12:26 PM
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 | |
10 | |
10 | |
9 | |
7 | |
7 | |
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.