on 11-25-2009 5:00 AM
Hi All,
I want to navigate from one view to another. When i click the button to navigate a popup menu should appear with two buttons Yes & No. If I click 'Yes' it should navigate to next view and if I click 'No' it should not navigate..
Can any one help me in doing this...
Thanks,
Susil..
Refer this code :
data: l_cmp_api type ref to if_wd_component,
l_window_manager type ref to if_wd_window_manager,
l_popup type ref to if_wd_window,
l_text type string_table,
l_api type ref to if_wd_view_controller.
l_cmp_api = wd_comp_controller->wd_get_api( ).
l_window_manager = l_cmp_api->get_window_manager( ).
insert `Data where changed` into table l_text. "#EC *
insert `Do you want to save?` into table l_text. "#EC *
l_popup = l_window_manager->create_popup_to_confirm(
text = l_text
button_kind = if_wd_window=>co_buttons_yesno
message_type = if_wd_window=>co_msg_type_question
window_title = 'Test: Popup to confirm'
window_position = if_wd_window=>co_center )."#EC *
l_api = wd_this->wd_get_api( ).
l_popup->subscribe_to_button_event(
button = '07' "if_wd_window=>co_button_yes
action_name = 'YES'
action_view = l_api
is_default_button = abap_true ).
l_popup->subscribe_to_button_event(
button = '08' "if_wd_window=>co_button_no
action_name = 'NO'
action_view = l_api
is_default_button = abap_false ).
l_popup->open( ).
Now you can create two Actions in your View - One for Yes button and other for NO button.
In the Yes button , you can fire the plug to navigate to second view.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
the following parameters of the IF_WD_WINDOW_MANAGER~CREATE_POPUP_TO_CONFIRM method also do not have any effect:
WINDOW_LEFT_POSITION
WINDOW_TOP_POSITION
WINDOW_POSITION
WINDOW_WIDTH
WINDOW_HEIGHT
So i dont think you will be able to control the size of window.
Refer the sap online help :
http://help.sap.com/saphelp_nwmobile71/helpdata/en/47/b9487601602fe2e10000000a42189d/content.htm
Hi,
You can refer to the below thread (Thomas reply)
You can not set the size directly on the popup. I know that there are attributes and methods for this; but they are ignored in the HTML rendering. They are for future usage/smart client rendering. For now in the HTML rendering you can set the size by inner content of the popup. The popup automatically resizes to its inner content. If you are reusing one of the standard SAP-Provided confirmation popups, then you really can't control the size.
Priya
User | Count |
---|---|
75 | |
10 | |
10 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.