How to Close Popup Window
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
Similar Messages
-
How to show Popup window in OAF on click of a button
How to show Popup window in OAF on click of a button (Without using Javascript)
1. I have one OAF page on which i should have button Called "Next"
2. On clicking of this button a new window/page should be displayed with the image stored in database. on clicking on this "Next" button again next image from the database should be displayed on the newly opened window/page.
3. Is it possible to configure OAF to render window_II in the opposite screen of window_I where the OAF client resides? (If the OAF-client resides in screen_I render window with image in screen_II). That is, at the first click on the Next-button, window_II appers on screen_II and not some random location. The user will have 2 screen/monitors on his work place.
4. Given that the two windows reside on each screen, is it possible to make OAF remember the position of window_II ? The goal of this is to force the window to pop up on the same location on the same screen next time the Next-button is pressed.
5. If window_II is closed (eg. by using X) and the Next-button in window_I is pressed again, will window_II pop up in the same location and screen as previously ?
6. Is it possible to have a Print-button in window_I what prints the scanned picture in window_II ? Is it possible to have the click on this Print-button to open the standard print dialog on top of window_II ? Could the button be placed in window_II as well, having the same functionality ?I have tried to open home page window. You can change the URL according to your requirement.
import oracle.apps.fnd.framework.webui.OAUrl;
StringBuffer l_buffer = new StringBuffer();
l_buffer.append("javascript:mywin = openWindow(top, '");
String url = "/OA_HTML/OA.jsp?OAFunc=OAHOMEPAGE"; // Calling Oracle Home Page
OAUrl popupUrl = new OAUrl(url, OAWebBeanConstants.ADD_BREAD_CRUMB_SAVE );
String strUrl = popupUrl.createURL(pageContext);
l_buffer.append(strUrl.toString());
l_buffer.append("', 'lovWindow', {width:750, height:550},false,'dialog',null);");
pageContext.putJavaScriptFunction("SomeName",l_buffer.toString());
Above code will open the new page in new window.
Thanks
--Anil -
How to close PopUp (from taskflow region)???
Can someone, please, explain how to solve this use-case:
I have PopUp in which I put a region (in which is a small TaskFlow consiting of 2 JSFFs). I want to have Cancel and OK buttons in both JSFFs in TaskFlow. How to close PopUp from within TaskFlow ??? I saw the TaskFlow Return component in ADF TaskFlow diagram components (in palette) but haven't found any help/documentation on it. Or, should I use Return listener on command button used to rise popup (but, still, how to close popup from taskflow?)?
Any help would be great!
Thanks in advance,
Markomimarko,
Regions/Taskflows are meant to be isolated reusable components. They are not meant to
have knowledge of their parent or container. That said, code contained with in a region should not attempt to reach out an modify the parent. Regions can fire contextual events that can be handled by a listener declared in the parent pages pageDef. However, attempting to close a popup from a context listener would be bad practice. The easiest fixt is to put the popup in the taskflow for your region. That will create a reusable popup that you can use through out your application.
--Ric -
How to close open windows with ios7, How to close open windows with ios7
How to close open windows with ios7, How to close open windows with ios7?
Guess they thought we needed more exercise so now we have to swip them to close.....miss iOS6. My eyes are blurry now after looking at my phone, and my arms are tired from swipping lol
-
How to close parent window when we use call method l_window_manager- create
hi...
how to close parent window when we use call method l_window_manager->create_external_window
thank you.hi
good
go through this link,hope this ll help you to solve your problem
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/63a47dd9-0b01-0010-3d8e-de27242bf011
thanks
mrutyun^ -
hi,
i need to write a program that could open and close a particular url in ie browser for a particular number of times. i could open the browser using following code
cmd = WIN_PATH + " " + WIN_FLAG + " " + url;
Process p = Runtime.getRuntime().exec(cmd);but i could not find how to close the window - please helpp.destroy()... but how do you decide when to destroy the process -- are you using a timer or whuh?
By the way, if you just want to open a browser in a platform independent way, you could try the new Desktop [browse |http://java.sun.com/javase/6/docs/api/java/awt/Desktop.html#browse(java.net.URI)] method. -
How to close child windows when parent window closed in jsp
how to close child windows when parent window closed in jsp
becoz it can't be able to recognise it's parent
with the whole application
plz send me some sample code of itHi, I have no idea how to do this is JSP.
However createing a modal window (with javascript) would mean that the user can not use the parent window untill he closes the child window. However not sure if this is what you are searching.
Otherwise you can detect the onClose (I think) and close the window from there.
However both the above are JavaScript and not JSP.
rwgards,
sim085 -
How to close main window on click of a button on popup window
Hi All,
I have created a web page which on certain condition display a popup window to to provide information. Wht i want is that when i click on close button on my popup window, my main window should also close.
Can anyone please help with this requierment!!!
Regards,
tusharHi All,
Could anyone of you please help me by answering the thread
WDDOEXIT method not called when the application is closed from the portal
Thanks,
Subash M -
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 -
How to create popup Windows in WebDynpro
I am learning WebDynpro and have developed a sample application where i ask the user to login. In case of incorrect login I want to display a popup window which shows an error message and has an ok button on it. On click of the OK button i want to close the Window.
I have created a view for this popup... called errorView
On click of login button i perform validations n incase the validatins fail i have put in the following code
IWDWindowInfo myWinInfo = wdComponentAPI.getComponentInfo().findInWindows("Ra_ErrorView");
myPopupWindow = wdComponentAPI.getWindowManager().createWindow(myWinInfo,true);
myPopupWindow.setWindowPosition(300,150);
myPopupWindow.open();
How should i proceed?
Where should i write the myPopupWindow.close()
Kindly give a step-by-step solution.Hi Reema,
You want to close a window say window1 which you opened from a view.
create an attribute. select its type from java native settings to IWDWindow
wdContext.currentcontextElement().setWindowInstance(window);
1.create an event in component controller say event1
2.In order to trigger the event in component controller create a method in it
write this code in implementation of controller to trigger the event
wdThis.wdFireEventAddressSelectedEvent();
3.For catching whatever event that is responsible for closing the window create an event handler in view1 say eventhandler1.Choose the subscibed event to be event1
4.In that eventhandler1 write the code in implementation
IWDWindow window =
wdContext.currentcontextElement().getWindowInstance();
window.close();
Hope this helps you.Do revert back if you have more doubts
Regards
Rohit
Message was edited by: Rohit Radhakrishnan -
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 -
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 PMHi,
when u are creating the pop up window then there is a parameter close_in_any_case set its value as abap_false. -
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>
Maybe you are looking for
-
Error while extracting zip file
I am using the following code to extract zip files from jar file source = "zip/test.zip" destination = "c:\\" public void unzip(String source,String destination){ try{ ZipInputStream in = new ZipInputStream( this.getClass().g
-
How to find out who created an order in MD11?
Hello everyone! I have a very simple question for transaction code MD11. How can I find out who created an order via that transaction? I´ve already found table PLAF with the following fields PSTMP & PUSER for time and user of last modification, but I
-
Hi to everybody, I'm trying to show an error exception like this example: try catch (Exception cause) StackTraceElement elements[] = cause.getStackTrace(); for (int j = 0, n = elements.length; j < n; j++) System.err.println( elements[j].g
-
Will 'Microsoft Outlook Mac' Notify Me On Notification Centre on OS X Mt Lion?
Just Wanna Know To See if I Should Use 'Mail' or 'Microsoft Outlook Mac'?
-
i added a new podcast for today. went to upload and i get a unknown error. not sure what is going on. help.