on 11-27-2007 8:59 AM
Hi all,
I have created a method for created popup in the component controller with button kind 'yes-no'.Now i use it in the view.
Till here all is working fine.
Now i want to use the events which triggers on the popup (yes, no).Any idea how to trigger these buttons action.
The problem i am facing here is: When i use <b>subscribe_to_button_event</b> method it does not working.
Any ideas how to use this.
Points will be sured.
Sanket sethi
Hi alex b justin,
Actually i am created popup window from component controller and adding buutons and their events in view for multiusing of a popup.
Now i am not able to link the component controller to view:
CALL METHOD if_wd_window->subscribe_to_button_event
EXPORTING
button = if_wd_window=>co_button_yes
button_text = 'Confirm Yes'
action_name = 'YES'
<b>action_view = l_api</b>
is_default_button = abap_true.
help me out.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi sanket...
just pass ypour view id to the component controller method.
consider you are having a method m1 in component controller.
this m1 has the codings to call the pop up.
in the view v1 when a button is clicked, this method would be called.
in the import parameters of the method m1 create a parameter to get the view id of type if_wd_view.
so when you call this method from v1 pass this view id and this view id must be given in the subscribe_to_button_event.
--regards,
alex b justin
hi sanket.........
here is a code snippet... check this out.
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.
insert `Do you want to save?` into table l_text.
l_popup = l_window_manager->create_popup_to_confirm(
text = l_text
button_kind = if_wd_window=>co_buttons_yesnocancel
message_type = if_wd_window=>co_msg_type_question
window_title = 'Test: Popup to confirm'
window_position = if_wd_window=>co_center ).
l_api = wd_this->wd_get_api( ).
l_popup->subscribe_to_button_event(
button = 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 = if_wd_window=>co_button_no
action_name = 'NO'
action_view = l_api
is_default_button = abap_false ).
l_popup->subscribe_to_button_event(
button = if_wd_window=>co_button_cancel
action_name = 'CANCEL'
action_view = l_api
is_default_button = abap_false ).
l_popup->open( ).
--regards,
alex b justin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.