Don't close popup window on action
Hello!
I have a popup window, which contains another window from my component. I assigned actions to buttons. I need not to close popup after action in some cases. I want to decide in action's method. How can I avoid closing the popup?
Edited by: Konstantin Milutin on Feb 24, 2010 12:55 PM
Hi,
when u are creating the pop up window then there is a parameter close_in_any_case set its value as abap_false.
Similar Messages
-
Hi experts,
There is a popup window, with two button:
SAVE
CANCEL.
i create the popup in this way:
lr_popup = lr_window_manager->create_window(
modal = abap_true
window_name = 'WND_POPUP'
title = lv_text
close_button = abap_true
button_kind = if_wd_window=>co_buttons_yesno
message_type = if_wd_window=>CO_MSG_TYPE_NONE
close_in_any_case = abap_true
lr_view_controller = wd_this->wd_get_api( ).
lr_popup->subscribe_to_button_event(
button = if_wd_window=>co_button_yes
button_text = 'Save'
action_name = 'SAVE'
action_view = lr_view_controller
is_default_button = abap_true ).
lr_popup->subscribe_to_button_event(
button = if_wd_window=>co_button_no
button_text = 'Cancel'
action_name = 'CANCEL'
action_view = lr_view_controller
is_default_button = abap_true ).
lr_popup->open( ).
My problem is that, if the user press the SAVE button, then I have to make some checks, and if they don't pass, an error message should be created, and the popup shouldn't close.
My question is: How can I do that?
It's ok that if I use the paramter:
close_in_any_case = abap_false
then the popup isn't closed, but how can I close it in the action handler method of the Close button (or the save when the cehcks are fine)
Thnaks.
N.Hi,
When there are errors do you want to display them on popup. If there are errors and user closes the window(click on close) button then these errors are shown in parent view rather on popup window.
Do you want to handle this also..
In addition to making that close_button as abap_false. there is a method to handle on button close in if_wd_window interface.
Try to use and write the close window code.
If you donot want to show the errors in parent view, In the abobe metthod for window close, clear all the messages and then close the window.
check out this link -
Re: Form field validation messages in pop-up window
Regards,
Lekha. -
Close Popup window in webdynpro abap.
Hi,
Can anyone tell me ...how to close the popup window through the action in webdynpro abap . In my popup window there is a button(i.e 'UPDATE') apart from that default 'OK' button , I want that when 'UPDATE' button is pressed, along with the action window should be closed. I dont want to close the window by pressing 'OK' button at the botton
I have used following code to open the popup window.
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.
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 = 'POP_UP WINDOW'
title = ''
close_in_any_case = abap_true
message_display_mode = if_wd_window=>co_msg_display_mode_selected
close_button = abap_true
button_kind = if_wd_window=>co_buttons_ok
message_type = if_wd_window=>co_msg_type_none
default_button = if_wd_window=>co_button_ok
lo_window->open( ).Hi Dear,
please try this code,
DATA lv_wc TYPE REF TO IF_WD_WINDOW_CONTROLLER.
data lv_view TYPE REF TO IF_WD_VIEW_CONTROLLER.
data lo_window type ref to if_wd_window.
lv_view = wd_this->wd_get_api( ).
lv_wc = lv_view->GET_EMBEDDING_WINDOW_CTLR( ).
lo_window = lv_wc ->GET_WINDOW( ).
lo_window->CLOSE( ).
Message was edited by: kumar.k kulanthaivel
Regards,
K. Karthikeyan -
How to auto close popup window of UWL?
Hi everyone! I have developed a web dynpro abap application that is being launched by the UWL in a new window. How do I close the window after the web dynpro application is done processing? I cannot use exit-plugs as these don't work in the portal. If I use the portal navigation classes(absolute and relative) these ask for a target address but what I want is to close the window. Has anyone done this before? Thanks! Generous points will be awarded!
If you are ready to open your webdynpro application inside the UWL itself (instead of opening as a pop up) you can try the following. In such a case you can set a re-direction page which points out to the URL of your UWL on the required action (say "Approve" or "Reject"). Hence when you perform the required action your UWL screen will be re-displayed once again.
If you want only pop up from UWL then you may try posting it in Web Dynpro ABAP.
Thanks,
Prasath N -
I have a typical popup window launched using the builtin javascript:popupURL().
I would like a Save and Close button on this popup window that does
1. Submits the popup page so that changes are saved into session state
2. Close the popup window
3. Refresh the parent window so that updates in (1) are reflected
What is the recommended way of doing this? I was thinking of the following URL redirect on the Save & Close button
doSubmit('SAVE');
window.opener.location.reload();
window.close();Do I need a same-page branch on the popup page? If so, why? If not, why? ;-)
Comments?
ThanksThis is a bit of javascript that I nicked which works well for me:
-- 1. Add the folowing to your page header or create a new page template --
-- (popup window template) and put it in the header section. --
SCRIPT LANGUAGE="JavaScript">
function loadinparent(url, closeSelf){
self.opener.location = url;
if(closeSelf) self.close();
</SCRIPT>
-- 2. Use the following to call the function. the true and false keeps the parent--
-- window open or closed. Obviously set any values in the URL. --
javascript:loadinparent(''<URL>'', true)
eg. javascript:loadinparent(''f?p=&APP_ID.:40:&SESSION.::NO::P40_ID:'||ID||''', true)
-- Inc the following comment in your header --
-- Version 1.0
-- Last Updated: May 18, 2000
-- Code maintained at:
-- http://www.moock.org/webdesign/javascript/
-- Copy permission granted any use provided this notice is unaltered.
-- Written by Colin Moock.
Simon -
Close popup window and refresh the parent window
Hello,
I have a button in a normal report, when clicked opens up an popup window which is a form containing some items and here in this form (i have some editable text items) I make some changes and click on the apply changes button -- this should update the form, close the popup window and should refresh the parent window.
can anyone please help me out with this issue.
Thanks,
Ortonyou have your popup window. When they apply the changes you want it to close the window, right?
Modify the button (save, apply changes) and give it url redirect to the custom function you create (See below): javascript:saveChanges();
in the page header, add a new function:
<script type="text/javascript">
function saveChanges(){
doSubmit('SAVE');//this is the line to save the current form on the popup window. (This assumes SAVE is the request value that should udpate the db)
window.close();//close the popup window
window.opener.doSubmit('REFRESH');//call doSubmit function on the parent window to cause the page to refresh.
</script> -
Close popup window for swf file
The captivate movie plays properly in the popup window. The
"Close Movie" command does not automatically close the popup window
on some computers. Any sugestions?You said, "Some customers?" does it work for other customers?
Is there a difference between the way two customers are viewing the
file? Compare the two, and you may get some hints.
thanks -
Hi All,
in my main View iam calling a popup window, there i select some values and when i click select button i want to close the popup window.
Thanks,
RAju.Hi Raju,
What you can do is while creating the pop window you can take the reference of window manager in some reference attribute of type IF_WD_WINDOW in component controller like.
wd_comp_controller->gr_window =
lr_window_manager->create_window(
window_name = 'Window'
if_wd_window=>co_msg_display_mode_selected
* close_button = abap_true
button_kind = if_wd_window=>co_buttons_ok
message_type = if_wd_window=>co_msg_type_none
default_button = if_wd_window=>co_button_ok
**and now you can call the close method of window at the event you want to close pop up window.
wd_comp_controller->gr_window->close().
Regards
Amol -
Hi,
i have created a popup-window with
wd_comp_controller->window = lo_window_manager->create_window_for_cmp_usage(
interface_view_name = 'W_DEFAULT'
component_usage_name = 'XYZ'
title =
close_in_any_case = abap_true
message_display_mode = if_wd_window=>co_msg_display_mode_selected
wd_comp_controller->window->open( ).
Now I have the problem, that the window will be closed if I press ESC.
Is there a possibility to catch this event.
Regards,
MarcusHi ,
when u press Esc then the method WDDOONCLOSE of the window is called ..
Regards
Yash -
Close popup window from loaded movie
I have an html link which launches a flash movie into a
separate html window. The flash movie then loads another movie into
level 10. from this level, I am trying to close the flash movie and
its associated html page using the code:-
javascript:window.close();
This doesn't work. It closes level 10, but leaves level 0 and
the html page intact. How can I resolve it?
Any help would be very much appreciated.I have carried out a simple test using the above code to
close a single swf with no loaded movies. This works. However, when
I try to load a movie into a higher level and close the whole movie
together with its html page from there, it doesn't work.
Thanks -
Modal Popup Window close issue
Hi,
i have a master detail form
i added a link field on detail form to open a form in popup modal mode
i putted on Link Attributes onClick="new Ext.ux.PopupWindow({url: this.href, height: 450}).show(); return false;"
due Modal Popup Window example by Mark Lancaster
([http://oracleinsights.blogspot.com/2009/09/apex-modal-windows-are-snap-using-extjs.html])
I can't close popup window and return on calling page
Any help?
Thanks in advance
Lukx
so --> win xp
rdbms --> 10.2.0.4
apex --> 4.0.2.00.07Hi lukx
You will find additional information in the comments on my blog that will solve your problem.
Also, my book contains an even better solution for this in chapter 10, page 334.
Regards
Mark
demo: http://apex.oracle.com/pls/otn/f?p=200801 |
blog: http://oracleinsights.blogspot.com |
book: Oracle Application Express 4.0 with Ext JS -
Javascript to open popup window and disable parent window
Hello,
Can anyone please help me the javascript issue.
I have a button which opens up a pop window and when this popup window is opened i want to disable the parent window and enable it when i close the popup window.
can anyone please help me with a possible approach.
Thanks,
Orton
Edited by: orton607 on Aug 25, 2010 2:19 PMjari,
I have a problem with this modal window approach and I have noticed. The thing is I am able to open up a popup window which is a simple data entry form. In this form i have the button Create which calls a javascript function and then an pl/sql insert process.
Below is the javascript function for the button create
function createNew()
doSubmit('CREATE');
alert('Successfully inserted the record. Click OK to close popup window and to \n view details of the new inserted record please select the table on parent window.');
window.close();//close the popup window
window.opener.doSubmit('REFRESH');
//call doSubmit function on the parent window to cause the page to refresh.
}The problem, i have is when i open up a popup window in this window when I click on the create button, its again opening up a new empty window. i don't understand what might be the problem.
can you please help me out with this one.
thanks,
orton
Edited by: orton607 on Aug 25, 2010 4:19 PM -
Not able to display the desired view if button is pressed in POPup window
Hi Experts,
I have developed a web dynpro application.In this i have created a pop up window which consists of three buttons YES , NO and CANCEL.
I have developed three event handlers in the view VIEW_POPUP which is acting as view of the pop_up window. When i click on any of these buttons no event handler is getting triggered.
Please give your suggestion as where the problem is.Hi Ravi,
I think u created a view and embedded it in another window and calling that window.,
If u want to display a popup window with action buttons., jus use create_popup_to_confirm() method.
refer this code,.
* Data declarations for Pop up window
data: lt_text type string_table,
lo_window_manager type ref to if_wd_window_manager,
lo_api_component type ref to if_wd_component,
lo_window type ref to if_wd_window,
l_api type ref to if_wd_view_controller.
msgtext = 'Do u want to continue. ?'
append msgtext to lt_text.
clear: tmp_from , tmp_to .
l_api = wd_this->wd_get_api( ).
lo_api_component = wd_comp_controller->wd_get_api( ) .
lo_window_manager = lo_api_component->get_window_manager( ).
lo_window1 =
lo_window_manager->create_popup_to_confirm(
text = lt_text
button_kind = if_wd_window=>co_buttons_okcancel
message_type = if_wd_window=>co_msg_type_information " this is info msg u can give error message here
close_button = 'X'
window_title = 'Confirmation message box'
* lo_window->subscribe_to_button_event
lo_window1->subscribe_to_button_event(
button = if_wd_window=>co_button_ok
action_name = 'SUBMIT_REQUEST' " Submitting Request. " u have to create SUBMIT_REQUEST Action
button_text = 'Yes' " And Place the code in that action which u want to execute when yes
action_view = l_api
is_default_button = abap_false
* lo_window->subscribe_to_button_event
lo_window1->subscribe_to_button_event(
button = if_wd_window=>co_button_cancel
action_name = 'CANCEL_REQUEST' " Calling Action On clicking NO. "u have to create CANCEL_REQUEST
button_text = 'NO' "Action
action_view = l_api
is_default_button = abap_true
lo_window1->open( ).
reply if u need some more clarifications.,
Thanks & Regards
Kiran -
Hello
I have a button on a page opening a popup window. This popup window includes a page with form and the classical Create Cancel Submit Delete buttons.
Of course, when clicking Cancel, Submit or other buttons, the popup does not close and I end up with the target page in the popup !
How can I solve this ? (I'm using apex 4)
Edited by: Arnaud Ladrière on 26 août 2010 16:16Hi Arnaud,
You may find it useful to refer to the Build Custom Popup Pages 'How To' available here: http://www.oracle.com/technetwork/developer-tools/apex/how-to-create-custom-popups-085945.html , which outlines the steps to create the popup, including the JavaScript to pass back values to the parent page and then close the popup.
There's also numerous related threads on the forum which could also prove useful to you:
http://forums.oracle.com/forums/search.jspa?threadID=&q=how+to+close+popup+window&objID=f137&dateRange=last90days&userID=&numResults=15
Regards,
Hilary -
Close popup on completion of procedure
I have built a custom popup that I use to record a value in conjunction with the current screen. The popup gathers values from the current screen, asks the user for a little more input, then saves the records. The procedure is working great. After the procedure completes, I would like to close the popup window.
I've tried two things: using a Close Popup Window procedure and using hints from this thread:
Re: Close popup after MRU
I had it working (the close part) but I had to go back and alter some of my page and now it isn't working again. Can someone suggest what to look at?
HTML header:
<script language="JavaScript" type="text/javascript">
function closeWindow()
if ( document.getElementById("P1069_SAVESTATUS").value == 'R' )
window.opener.location.href=window.opener.location.href;
window.close();
</script>One HTML region, source is:
<script language="JavaScript" type="text/javascript">
onLoad="closeWindow();"
</script>Region item P1069_SAVESTATUS is set as Hidden, set to 'N' when session state is null.
Process is as follows (triggered by FINISH button):
declare
v_job NUMBER := :P1069_TC_ID;
v_dt DATE := to_date(:P1069_DT,'MM/DD/YYYY');
v_emp NUMBER := :P1069_EMP_ID;
v_pkg NUMBER := :P1069_PKG_ID;
cursor c_pkg is select COURSE_ID from TRAINING_PKG_ASSIGN
where COURSE_PKG_ID = v_pkg and COURSE_ID > 0
order by COURSE_ORDER;
v_crs NUMBER;
v_eemp NUMBER := :G_USER_ID;
v_edt DATE := SYSDATE;
begin
delete from EMP_TRN_HISTORY
where TC_ID = v_job;
open c_pkg;
LOOP
FETCH c_pkg into v_crs;
EXIT WHEN c_pkg%NOTFOUND;
insert into EMP_TRN_HISTORY (EVENT_ID, EVENT_DATE, TRN_CRS_ID,
ENTRY_EMP_ID, ENTRY_DATE, TC_ID, EMP_ID, PKG_ID)
values (SEQ_EMP_HISTORY.nextval, v_dt, v_crs,
v_eemp, v_edt, v_job, v_emp, v_pkg);
END LOOP;
close c_pkg;
:P1069_SAVESTATUS := 'R';
end;Try changing the HTML in your region to
<script language="JavaScript" type="text/javascript">
closeWindow();
</script>the onload="" notation would be used if you were putting the function call in the <BODY> tag of the page.
Maybe you are looking for
-
Lion produces weird trackpad behavior in Angry Birds
I upgraded to Lion this week. I know there are all sorts of new trackpad features, but the probem is that it messes up a lot in Angry Birds. For example, the various finger-swipes have unpredictable results; instead of resetting the screen, it might
-
Hello everyone, and thanks in advance for any help. PIaying a Flash game on Facebook or watching Flash movies shuts off machine. I am at wits end. I recently bought a Gateway desktop. The specs: - Intel Quad core - 8GB Ram - Vista Ultimate 64 - N
-
Java Real-Time System HotSpot(TM) Client VM warning: unable to lock pages i
Error: Java Real-Time System HotSpot(TM) Client VM warning: unable to lock pages into memory I'm getting this error, although I have assigned all the needed privilegs to root and I am logged in as root. I have done everything described in the guideli
-
Could not complete the define brush command because no pixels are selected
I have created brushes before, but I keep getting this message when I try now.
-
Can't access Vodafone Live! anymore on my Vodafone...
It happend when i installed a user certificate.. exp.cer I deleted the file but still i can't access the Vodafone Live portal.. Don't ask me wherefore i needed the certificate, coz i don't know anymore but i shall attach the file if that helps solvin