on 07-25-2008 2:57 PM
Hi,
Is it possible to navigate from a view of one window to a view of another window? If yes, how?
I am trying to navigate from a popup window to a view different from the one that the popup was called from.
Hi,
refer to these examples
WDR_TEST_NAVIGATION,WDR_TEST_NAVIGATION_00
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you want to navigate from one view to other view.
1.create another application and assign second window to that.
2.write the below code in the first view onActionXXXX.
method ONACTIONCLICK .
data:
lr_ref TYPE REF TO ig_<window>,
str type string,
l_window1 type ref to IF_WD_WINDOW_ManageR,
result type ref to IF_WD_WINDOW,
l_cmp_api type ref to if_wd_component.
CALL METHOD CL_WD_UTILITIES=>CONSTRUCT_WD_URL
EXPORTING
APPLICATION_NAME = <ztest_app2> "second app.name
IMPORTING
OUT_ABSOLUTE_URL = str
.
l_cmp_api = WD_COMP_CONTROLLER->wd_get_api( ).
l_window1 = l_cmp_api->get_window_manager( ).
result = l_window1->create_external_window(
url = str
).
* open( )will open your view of second window in new page
result->open( ).
endmethod.
is this the your required one?or some thing else.
if your requirement is not fullfilled let me know.
Thanks,
suman
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Suman & Abhi,
I really appreciate your answers, however my issue remains unanswered.
I have a component with four views.
The first three are in the main window. Lets call them view_1, view_2, and view_3 in window wd_main.
On certain conditino in view_2, I need a popup with a warning message with two buttons Yes and No. Lets call that fourth view view_popup. If I press the "Yes" button, I want to navigate to view_1, after closing the popup view_popup.
I have tried making use of do_dynamic_navigation but to no avail.
This is the code, I used for the same,
DATA: l_cmp_api TYPE REF TO if_wd_component,
l_cmp_usage TYPE REF TO if_wd_component_usage,
l_api TYPE REF TO if_wd_view_controller,
l_intf_controller TYPE REF TO iwci_salv_wd_table,
l_node TYPE REF TO if_wd_context_node.
l_cmp_api = wd_comp_controller->wd_get_api( ).
l_api = wd_this->wd_get_api( ).
IF wd_this->cmp_usage_group IS INITIAL.
wd_this->cmp_usage_group = l_cmp_api->create_cmp_usage_group(
name = 'MAIN_USAGE_GROUP'
used_component = 'ZRKS_TEST_KT' ).
l_cmp_usage = wd_this->cmp_usage_group->add_component_usage(
name = 'MAIN_USAGE'
used_component = 'ZRKS_TEST_KT').
l_cmp_usage->create_component( ).
l_api->do_dynamic_navigation(
source_window_name = 'POPUP_CONFIRM'
source_vusage_name = 'VIEW_POPUP_NAME'
source_plug_name = 'TO_V_1
target_component_name = 'ZRKS_TEST_KT'
target_component_usage = 'MAIN_USAGE'
target_view_name = 'V_1_MAIN'
target_plug_name = 'DEFAULT'
target_embedding_position = 'V_1_MAIN/CONTAINER1' ).
ENDIF.
However I am getting an error VIEW_POPUP_NAME is not a usage.
Had navigation been possible in the domodifyview, things would have been very simple.
Hi
Yes, No buttons are the standard popup buttons right,
you might have subscribed those buttons in the calling View that is V_VIEW2.
An event handler must be getting called in V_VIEW2 when there is a button click Yes or No
inside the event handler
close the popup window
lr_popup->close( ).
fire the plug ( create inbound for V_View1, outbound for V_VIEW2 and create navigation link in the main window )
wd_this->fire_out_plg( ).
Abhi
Hi Abhi,
The yes and no buttons are standard uielements buttons which are defined in the popup view ie. view_popup. And the eventhandler for the same exist in view_popup. Once I execute the closing of the popup_window, the control goes back to wddomodifyview of view_2.
Are you talking about creating a dynamic outbound and inbound plugs here and a dynamic navigation?
Regards,
Rajesh K Soman
Ofcourse possible.
subscribe a button click event of the popup and handle it in the main window.
code in the eventhandler
to close the window and navigate to another view
Abhi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.