on 08-02-2010 11:34 AM
Hi,
I am new to webdyn pro abap.i have one component with button and textfield.on click of button pop up window should appear containing an input field and on click of button in the pop up window,the text entered should get displayed in the component's textfield.kindly guide.
Try using the below code for creating a pop up.
DATA lo_window_manager TYPE REF TO if_wd_window_manager.
DATA lo_api_component TYPE REF TO if_wd_component.
DATA lo_window TYPE REF TO if_wd_window.
DATA l_api TYPE REF TO if_wd_view_controller.
lo_api_component = wd_comp_controller->wd_get_api( ).
lo_window_manager = lo_api_component->get_window_manager( ).
lo_window = lo_window_manager->create_window(
window_name = 'Window Name'
title = 'Title for the pop up'
message_display_mode = if_wd_window=>co_msg_display_mode_none
message_type = if_wd_window=>co_msg_type_none
default_button = if_wd_window=>co_button_cancel
).
wd_comp_controller->go_window = lo_window.
lo_window->open( ).
In the code for ok button, set the value to the attribute that you require.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks all.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Refer to following article which explains the usage of popup windows in web dynpro with examples:
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/90b46fb9-e48f-2c10-eaa8-cb47d9c91dce
Hope this helps!
Regards,
Srilatha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
Simple way is to define in your component controller a context node (data) there in a context attribute called text.
create 2 views . (Main View and popup view)
Both view has context mapping with data node from component controller.
In main view use text view element and bind attribute text with context attribute text.
in popup view use input field and bind attribute text with context attribute text.
create two windows and embed main view in main window, popup view in popup window.
now on action button clicked - you can call webdynpro code wizard (ctrl + F7) and click second tab(General)
you can click the generate popup radio button ,fill in popup window for the window name and press Ok.
Code will be generated.
since you are sharing one context attribute you don't have to work with any event handlers from your popup view.
in complex scenario's, you can create events in your popup view and subscribe to that events in your main view to close pop up or data population.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
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.