on 07-19-2010 2:38 PM
Friends,
I have created one web dynpro application, here In main view i have added one button, and in event of this button I wanted a Popup window with "FormattedTextEdit" component in it, which I created using code :
======
DATA: L_CMP_API TYPE REF TO IF_WD_COMPONENT,
L_WINDOW_MANAGER TYPE REF TO IF_WD_WINDOW_MANAGER,
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( ).
IF WD_THIS->POPUP IS INITIAL.
WD_THIS->POPUP = L_WINDOW_MANAGER->CREATE_WINDOW(
WINDOW_NAME = 'POPUPWIN'
BUTTON_KIND = IF_WD_WINDOW=>CO_BUTTONS_OKCANCEL
MESSAGE_TYPE = IF_WD_WINDOW=>CO_MSG_TYPE_NONE ).
ENDIF.
L_API = WD_THIS->WD_GET_API( ).
==========
and also created buttons for this popup window using :
====
WD_THIS->POPUP->SUBSCRIBE_TO_BUTTON_EVENT(
BUTTON = IF_WD_WINDOW=>CO_BUTTON_OK
ACTION_NAME = 'POPUP_OK'
ACTION_VIEW = L_API
IS_DEFAULT_BUTTON = ABAP_TRUE ).
WD_THIS->POPUP->SUBSCRIBE_TO_BUTTON_EVENT(
BUTTON = IF_WD_WINDOW=>CO_BUTTON_CANCEL
ACTION_NAME = 'POPUP_CANCEL'
ACTION_VIEW = L_API
IS_DEFAULT_BUTTON = ABAP_FALSE ).
WD_THIS->POPUP->OPEN( ).
====
Which is working very fine, but now I want the value of the component - FormattedEditText of my popup window in to my parent(main) window on the event pressing Ok Button( POPUP_OK) . Can anyone please tell me how can I get this Texts in my parent Window.
Regards,
Hiren.
Within the view that has the FormattedTextEdit that is inside your popup window - just map the context of this view from the component controller. Then the parent view of the popup can map to the same component controller context. The component controller is global over all views - including those within a popup.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Hiren,
If you search in SDN , you will find some good and n number of document and examples available in SDN.
SDN wiki page lnik - http://wiki.sdn.sap.com/wiki/display/WDABAP/WebDynproABAP+Home
Regards,
Varun
Hi,
would you please help me,
*****************************************************************
DATA: L_CMP_API TYPE REF TO IF_WD_COMPONENT,
L_WINDOW_MANAGER TYPE REF TO IF_WD_WINDOW_MANAGER,
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( ).
IF lr_POPUP IS INITIAL.
lr_POPUP = L_WINDOW_MANAGER->CREATE_WINDOW(
WINDOW_NAME = 'W_POP_UP'
BUTTON_KIND = IF_WD_WINDOW=>CO_BUTTONS_OKCANCEL
MESSAGE_TYPE = IF_WD_WINDOW=>CO_MSG_TYPE_NONE ).
ENDIF.
L_API = WD_THIS->WD_GET_API( ).
=======> this tep, creating Buttons is not workimg with me, how have you done it
with me is always getting error ,
lr_POPUP->SUBSCRIBE_TO_BUTTON_EVENT(
BUTTON = IF_WD_WINDOW=>CO_BUTTON_OK
ACTION_NAME = 'POPUP_OK'
ACTION_VIEW = L_API
IS_DEFAULT_BUTTON = ABAP_TRUE ).
and after klicking ok.. how did you generat it? with saving, is ther a special event handler for this?
lr_POPUP->SUBSCRIBE_TO_BUTTON_EVENT(
BUTTON = IF_WD_WINDOW=>CO_BUTTON_CANCEL
ACTION_NAME = 'POPUP_CANCEL'
ACTION_VIEW = L_API
IS_DEFAULT_BUTTON = ABAP_FALSE ).
lr_POPUP->OPEN( )
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
92 | |
11 | |
10 | |
9 | |
9 | |
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.