on 07-17-2006 6:51 PM
Hi all,
I need to call a dialog box from a method in the component controller. It would be helpful if u could post the code too.
Thanks,
Sravanthi
Maksim,
No, it is not the same view from which i call the comp controller. Sorry, I guess I was not clear with my question. This is how it is:
I'm calling a method in the component controller from a method in view, say 'BOOKVIEW' which is in 'MAINWINDOW'.
wd_comp_controller->add_to_cart( ).
In the ADD_TO_CART method of the component controller, i need to open a dialog window. The dialog window's name is 'OPTIONWD' and there's a view embedded in it called 'OPTIONVIEW'. and i need to write the code to open this popup window in the 'ADD_TO_CART' method.
Thanks for all your help.
-Sravanthi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry, Spravanthis, seems like I don`t have an idea how to solve "An Instance of the View OPTIONWD Already Exists in the Component" issue. May be <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/9e242bf5-0901-0010-c99c-83c180163c73">this tutorial</a> can be useful for you.
Or in your system you will find the detailed example component WDR_TEST_POPUPS_RT_00. It is located in package SWDP_TEST.
Best regards, Maksmim Rashchynski.
Hi Sravanthi,
The exception is raised whenever a view becomes visible twice. It seems that view OPTIONVIEW was about to be displayed twice. This is not possible.
Btw.: Please use the button enumerations that are offered for popup windows. I saw that your call does not specify them.
Best regards,
Thomas
Maksim,
Thanks for all your help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have a method in a view of the main window that calls a method in the component controller. the code goes like this:
wd_comp_controller->add_to_cart( ).
In the method add_to_cart of the component controller, i need to call a popup window. I created a window and embedded a view in that window. and i wrote the code that i previously sent to call this dialog box.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Maksim,
this is the code i wrote:
DATA: api_component TYPE REF TO if_wd_component,
window_manager TYPE REF TO if_wd_window_manager.
api_component = wd_this->wd_get_api( ).
window_manager = api_component->get_window_manager( ).
wd_this->window = window_manager->create_window(
window_name = 'OPTIONWD'
close_button = abap_false ).
wd_this->window->open( ).
When i test it, this is the error i get.
"An Instance of the View OPTIONWD Already Exists in the Component"
how do i correct it?
Thanks,
Sravanthi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sravanthi,
data:
l_componentcontroller_api type ref to if_wd_component.
l_componentcontroller_api = wd_this->wd_get_api( ).
And afterwards use
IF_WD_COMPONENT->GET_WINDOW_MANAGER->CREATE_WINDOW
Best regards, Maksim Rashchynski.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.