Trying to close window on cancel

Hi,
On cancel action [Button], I am trying to close current window but not finding a way to get the access to current window instance so I can close and destroy it.
Existing tutorial "Dialogue Boxes in WD Applications" talks about canceling a pop-up box but I am trying to close out existing window.
Guidance is much appreciated.
Thanks
Shahid

Hi Bhavik,
Yes you are correct I am trying to close my application.
According to what you describe here I have done the following:
Created an exit plug on my WebDynproCOInterfaceViewController (since view is embeded in this window and GP calls through this interface) than implemented following code:
public void onActionCancel(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
    //@@begin onActionCancel(ServerEvent)
     try {
     String url = WDURLGenerator.getWebResourceURL(wdComponentAPI.getComponent().getDeployableObjectPart(),"Static.html");
     wdThis.wdGetWebDynproCOInterfaceViewController().wdFirePlugCancelCReview(url);
     } catch (WDURLException e) {
     e.printStackTrace();
    //wdThis.wdGetWebDynproCOInterfaceViewController().wdFirePlugCancelApp("javascript:void (window.close())");
    //@@end
Added Static.html in mimes folder as:
<html>
     <head>
          <script langauage="javascript">
               function closeWin(){
                    window.close();
          </script>
     </head>
     <body onload="javascript:closeWin();">
     </body>
</html>
When I select Cancel Button I get the following error:
The initial exception that caused the request to fail, was:
   com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Cannot navigate from view WebDynproCOInterfaceView via non-existent outbound plug CancelCReview
    at com.sap.tc.webdynpro.progmodel.view.View.navigate(View.java:459)
    at com.skyline.caf.eu.gp.ui.csp.review.wdp.InternalWebDynproCOInterfaceView.wdFirePlugCancelCReview(InternalWebDynproCOInterfaceView.java:145)
    at com.skyline.caf.eu.gp.ui.csp.review.VReview.onActionCancel(VReview.java:258)
    at com.skyline.caf.eu.gp.ui.csp.review.wdp.InternalVReview.wdInvokeEventHandler(InternalVReview.java:309)
    at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:87)
    ... 28 more
I think I am almost there just little bit more hand holding from you guys will ghet me through a finish lane.
Thanks
Shahid

Similar Messages

  • Mail In Full Screen Closes Window after Sending

    I love using mail in full screen.
    When I send a new message or reply to a message the Mail window closes out of the full screen and closes the mail window.  How do I get the window to stop closing after I send or reply?

    I found out what is was. I had serial mail try to send about 200 emails. Something went wrong (not sure whether it is lion compatible) and there were a load of unsent emails somewhere in the background. Funny thing was they were not showing anywhere, just when I tried to close window, an unsent message popped up.
    Anyway, force quit mail as I could not be bothered to find out how many mails had not been sent, and on reopening all back to normal
    HTH

  • Using separate_frame=true and trying to close the applet window after...

    We are using separate_frame=true and trying to close the applet window (the one with the large gray box) after using the following post-form trigger:
    if :system.last_form = 0 then     
         message('Please wait while Forms closes - '||:system.last_form);     
         web.show_document('/forms/html/close.htm','_self');     
    end if;
    This works fine for the first form we open, but if that same form using Open_Form to open a child form we have a problem. When the child form is closed the user is returned to the parent calling form (which is expected), but then when the parent form is closed the separate applet window fails to close. Any suggestions?

    I guess you mis-interpreted the value of :SYSTEM.LAST_FORM. From the online-help:
    SYSTEM.LAST_FORM represents the form document ID of the previous form in a multi-form application, where multiple forms have been invoked using OPEN_FORM.So LAST_FORM shows always the ID of the last activated form, and this will never be 0 if you issued one OPEN_FORM in your application.

  • The webpage your are viewing is trying to close the window

    Hi. I run an HTML script which in turn runs my Web Form and quickly closes the initial IE window (for neatness). However, it the user first is prompted:
    "The webpage your are viewing is trying to close the window.
    Do you want to close this window?"
    Do you know what causes this and how I can surpress the message?
    Thanks in advance.

    See Re: HELP - CLOSE WEB BROWSER

  • Firefox will open a New Pop-up Window in Windows 7 Aero. When trying to Close it, it thinks it wants me to Close the Main Window. Why?

    I use Windows 7 Ultimate in Aero-mode. When a new Firefox window is opened, or a Pop-up window appears, I can't close it without first clicking on that page and clicking the "X" in the corner. Instead, whenever I try to close a window that is not the first window (my main window), it will ask me if I want to close the main window with all the tabs... I have noticed some other slight quirks in this stable release as well, but this one is always present.

    When I hover over the window, it does come up front, but as soon as I press the red "X" it goes immediately back to the main window and acts as if I was trying to close that one. Once in a while it will work, but shortly thereafter, it will just go back into this manner. Quite odd. This is the first time I've truly had any problems with Firefox.
    In addition to that problem I have noticed a few things, but one that may be linked is sometimes I'll click a link. Although I haven't specified to open it in a new window, it will do so anyhow. This gets annoying quickly. Usually shutting down Firefox and reopening will fix this (and once in a while just leaving it be for a long time). Somehow, I think this issue is somehow linked to the one above.

  • Open and close window

    Due to issues getting Google maps to work from within Edge Animate using jquery-ui-map I have resorted to loading a new HTML page containing the map.
    Is there a way that I can open the new window containing the Google map leaving the Edge page behind it and then close the new map window returning back to the Edge file?
    I can open the new window with the map fine but any attempt to close the window has failed. I tried a back button but this reloads the Edge file which is not what I want to do, I also tried self.close() which worked in a browser but after compiling with phonegap it stopped working.
    Can I load the html file into a div?

    Never used it myself, but there is a hack that adds system event sounds.
    http://www.unsanity.com/haxies/xounds
    I'm sure there will probably be issues with it when Snow Leopard comes out, so you may want to wait a few weeks after its release so the developer can address any incompatibilities.
    Mac OS 9 had system sounds, but I personally think Mac OS X is better off without all the noise. About the only ones Apple kept are the general system alert sound (which is useful) and the empty Trash sound.

  • Javascript Open and Close window

    I am creating a new website and am having problems getting
    the open window and close window to work. I want this window to
    open a new window (NOT a popup window used with the "onload"
    option). I am using an img tag so that when you click on the image
    thumbnail this new window opens. It is my understanding in order to
    use the window.close option, you must have the javascript in the
    header of the html document for the close to work. In the heading
    of the document that contains the link to open a new window I have
    the following:
    <SCRIPT language="JavaScript1.2">
    function popuponclick()
    Cellex = window.open("products/cellex.htm",
    "console","status=1,width=350,height=150");
    function closepopup()
    if(false == cellex.closed)
    cellex.close ();
    else
    alert('Window already closed!');
    </SCRIPT>
    Then I have this in the body:
    <img src="images/thumbnails/dermalogicath.jpg"
    alt="Dermalogica" width="94" height="84" border="0"
    /></a></td>
    <td><a href="products/mdskin.htm"
    onclick="window.open('products/mdskin.htm','mdskin',width=610,height=780,scrollbars=yes') ;return
    false; target="_blank">
    However, I'm getting script errors when opening the window on
    the lines in the body Unterminated error. I have tried using the
    help in Dreamweaver as well as many docs posted, but still cannot
    get this to work. Once I get the script errors resolved, the when
    the window opens, it will not close. I get the message that a
    window is trying to be closed and do I want to close the window
    which closes internet explorer entirely. I'm using IE 7.0 as well
    as foxfire and have the same issue on both. If I use the
    dreamweaver behaviors to call a javascript, it puts "onload" and if
    I change to "onclick" then the script will not work. When I use the
    behavior "open window" it still doesn't work. I'm totally lost as
    to what I'm doing wrong as I have followed about 10 papers all
    using the same instructions.
    Hopefully some one can help me, I'm getting fustrated as this
    seems to be pretty straight forward.
    Thanks, vienie

    Try this on for size:
    I have included two functions.
    windowRebuild() - opens a new window, maximizes it based on the screen size, removes all toolbars, and then closes the old window.
    myLocation(appName, pageName) - builds a url referencing an HTMLDB application, specfic to what server you are currently on. Very useful when you have an application on 3 different servers(dev, test, prod servers), you wouldn't want the server name hardcoded if you plan to export the app to another server.
    Also, you need to be careful when using &APP_ID. I am not completely certain how that is resolved at runtime, but I've found it only works when the javascript is in the HTML Header of a page and not stored in the template of the page.
    <script language="JavaScript1.1" type="text/javascript">
      This functions is for internal application use.
      Examples of myLocation:
      url = myLocation('&APP_ID.', 'APP_PUBLIC_PAGE');
      url = myLocation('MY_APP_ALIAS', 'MY_PAGE_ALIAS');
      url = myLocation('184', '10');
    function myLocation(myApp, myPage){
      var myHost = location.host;
      var newURL;
      newURL = 'http://'+myHost+'/pls/htmldb/f?p='+myApp.toString()+':'+myPage.toString();
      return newURL;
    /*  Function windowRebuild()
    *   This function will open a new window and close the old window.
    *   This function will also maximize the new window and remove all toolbars.
    function windowRebuild(){
       if(window.name != 'myAppWin'){
        var url = myLocation('&APP_ID.', 'PAGE_ALIAS');
        var myWin = window.open(url,'myAppWin','toolbar=0,scrollbars=1,menubar=0,status=1,resizable=1,location=0');
        window.opener = 'x';
        window.close();
       if(window.name == 'myAppWin'){
        window.moveTo(0,0);
        window.resizeTo(screen.availWidth,screen.availHeight);
    </script>Let me know if that works or you need some more explanation.
    Chris

  • ITunes problems after trying to install Windows XP service pack 2

    Hey guys, I've been having trouble with my iTunes among other programs recently, and I was wondering if anyone might be able to help. Basically, my iTunes has been acting strangely ever since I tried upgrading my Windows XP system with Service Pack 2. When it ran through installation, it got all the way through. However, once I rebooted the computer, it told me it was unable to complete due to an unstable system. So it told me to uninstall the software, and I removed it from my program list.
    Unfortunately, once I complete removed it from my hard drive, several programs on my machine started to malfunction. Now, whenever I try to play iTunes, it just stops working all of a sudden along with the rest of the sound software on this computer.
    The big problem is, I forgot to back up my system before I did all this, so now I'm worried that I'm stuck with this dysfunctional hybrid of a computer system. So now, I've tried reinstalling the old Service Pack 1 onto the computer, but it always seems to cancel in mid-installation.
    I know this is probably of a topic that should be posted, on an XP forum, but I was hoping that maybe someone on here might be able to give me some advice on how to solve this problem. If not for my computer, than perhaps at least for my iTunes trouble.
    Thanks to all who might be able to help.

    The reason I would think your iTunes stopped working is because your system is no longer compatible as iTunes requires Windows XP SP 2 in order to work properly.
    If you want to back up your iTunes content then I would suggest opening My Documents>My Music and choose the whole iTunes folder and move it to an external drive. That is normally where all your content is saved, unless you didn't have 'Copy files to iTunes Music folder when adding to library' selected in iTunes then you might want to use the whole My Music folder as your backup.

  • Acrobat reader install fails on vista - says close windows explorer

    I'm trying to install the latest reader on a Windows Vista laptop but the installation fails with an error message "you must close windows explorer".  In task manager there are no running applications but I can see explorer.exe in the list of processes.  I think this is running the desktop/taskbar so I don't want to close it.  Any ideas how to get round this?
    TIA

    This might work.
    1) Open Adobe Reader
    2) Go to Edit then Preferences
    3) Under Categories on the left side click on Internet
    4) Uncheck Display PDF in browser and click Ok.

  • Stuck trying to install Windows 7 Ultimate on X120e (Help please)

    I just got my x120e yesterday and it came loaded with Windows 7 Home Premium. Since my college offers free Windows 7 Ultimate I decided I would go ahead and install that, plus since I bought the computer used I figured that would be a good clean start. So I downloaded the software and used the windows tool to put the .iso file onto a thumb drive.
    When booting the x120e with my thumbdrive inserted it goes into the windows installation guide. The problem starts where it asks how I want to do the install, Upgrade or Custom. From the directions online and using google it seems I am suppose to select 'Custom' install. Then it asks where I want to install windows: Disk 0, Partition 1(system_drv); Disk 0, Partition 2; Disk 0, Partition 3(lenovo_recovery). When you highlight Disk 0 Partition 1 or 3 it says 'Windows cannot be installed to ...'. Disk 0 Partition 2 includes the bulk of the storage size, but when I highlight that one and click 'next' it comes up and says 'Setup was unable to create a new system partition or locate an existing system partition. See the setup log files for more information'. Also, I am unable to find anything called 'setup log' to get more information.
    * I did format the Disk 0 Partition 2 after it didn't work the first time
    I decided from googling that maybe I needed to add a hard drive driver in order for it to work. So I went to the Lenovo driver page on my other computer and put that on the thumb drive and loaded the driver in the windows install wizard. This had no effect though and the problem is still there.
    Given I've never loaded an OS before so I'm relying on online instructions and google. I have literally spent close to the last four hours working on trying to install Windows 7 Ultimate onto the x120e and am going to get some sleep and try again I guess.
    * I haven't changed the hard drive or anything, this is using the original 250gb hard drive it came with
    UPDATE: after getting a reply to this question on another forum, they said  "Delete all the existing partitions you see. Start the install on the unformatted partition. You will lose your recovery partition (the lenovo setup with Win 7 Home Premium)."
    So I did that and now the only line that shows up is Disk 0 Unallocated Space, 232.9GB.  However when I click Next the same warning appears as before "Setup was unable to create a new system partition or locate an existing system partition...".  Additionally the options of Delete and Format are no longer there, only Refresh, New, and Load Driver.  Any more help on what to do? thanks

    http://www-307.ibm.com/pc/support/site.wss/TVSU-UPDATE.html
    This program will download everything you need automatically.

  • Close Window (with O/P) out of IFrame

    Hi experts,
    I did create a new component (with bsp_wd_cmpwb) and therein a window.
    In this window I call an IFrame which is another BSP-Application.
    Now I would like to close this window out of the iframe.
    I did already create an O/P to close the window, but I don't know how to start the method in IFrame to do this.
    Just at opening the window SET_VIEW_GROUP_CONTEXT and DO_FINISH_INPUT are run-through.
    If I can force a run to this methods out of the IFrame it would be also ok for me, because therein I can fire the O/P.
    The closing with the O/P works fine, but I need to trigger/force it.
    First I tried to close it with the following jscript, but it doesn't work in firefox.
    <SCRIPT LANGUAGE="JavaScript">
        function closeAndRefresh(){
          opener.location.reload(); // or opener.location.href = opener.location.href;
          window.close();
        javascript:window.close();
              </script>
    Thank you for every help.
    Kind regards

    Does nobody have an idea regarding this?

  • Close window - need help

    Hi everyone,
    I'm working with JDeveloper 10.1.2, struts and uix pages.
    In my page1 I have a button to open a new window and in this new window I need to have a button to close it. I have done something like this:
    <submitButton event="EditarContactosEnfCs" formName="dataForm" text="Guardar1" onClick="javascript:window.close();"/>
    When I use onClick="javascript:window.close();" the window is closed (that is OK) but the event="EditarContactosEnfCs" is not executed. Why??
    Can enyone help me? Any ideias??? Please...
    Thanks,
    Atena
    Message was edited by:
    Atena

    Hi Ric Smith ,
    thanks for your replay :) it worked!
    I tried to do what you said like this, in strutsConfig.xml:
    <action path="/S2PopUpContactosEditar" input="/WEB-INF/page/S2PopUpContactosEditar.uix" type="oracle.jheadstart.controller.strutsadf.action.JhsDataActionEditarContactos" className="oracle.jheadstart.controller.strutsadf.action.JhsDataActionMapping" parameter="/WEB-INF/page/S2PopUpContactosEditar.uix" name="DataForm">
    <set-property property="bindParams" value="VOS2PopContactosAssoc1Iterator=${param.var2};VOS2PopUpContactos1Iterator=${param.var2}"/>
    <set-property property="modelReference" value="WEB_INF_page_S2PopUpContactosEditarUIModel"/>
    <forward name="EditarContactos" path="/S2Episodios.do"/>
    </action>
    and in the page where I need to submit, I have a button like this:
    <submitButton event="EditarContactos" formName="dataForm" text="Guardar" destination="S2Episodios.do"/>
    and the page that I'm going to open after submit, to close the window I add this:
    <body onLoad="javascript:window.close();">
    This works fine, but it's to slow. I see the message in the first page saying that the changes have beed commited and only then, go to the other page and close window.
    Is there another way of doing this? Make this faster, so when I press the submit button, the window is automatically close. Any ideias?
    Can anyone help?
    Thanks,
    Atena
    Message was edited by:
    Atena

  • Unix command to click button on dialog box and close windows?

    I administer an elementary school computer lab of 35 eMacs all with OS 10.4.7 and with ARD 3.0. Our network server configuration requires a mounted server on each desktop in order to administer certain software packages we use. Every morning at start-up I have to walk around and manually click "Connect" on the dialog boxes. Then, with this configuration, each time a server is mounted, it opens up a Finder Window on the host machine so I've got to walk around and close windows on all the machines. I'm sure there must be an AppleScript or Unix command that I can set up to do these two tasks but I've not found it (or learned how to write it) in a few days of searching. Any suggestions?
    Thanks,
    Dan

    OK guys,
    I just succeeded in saving the AppleScript command as an application. I put it in the Login Items just after the servers. It worked beautifully! No more open windows exposing sensitive files to the risks of elementary students (how come the mounted volumes always appear on the desktop even when the "hide" button is checked?). It would be great if the mounted volumes were not showing at least in a setting like a school computer lab.
    Now, I'm still dealing with the mounting process requiring me to manually click on "Connect" every time. The Student account doesn't even have a password just to make such things easier. Still the process displays this:
    (Oh well, I guess I can't insert a ScreenShot.)
    Here's what it says: Connect to the file server "server name."
    Connect as: Registered User
    Name: "account name"
    √Remember password in keychain
    (and then two buttons) Cancel or Connect
    That's where I'm at right now. My district Tech. Support folks say that there's no way to avoid the dialog box but John seems to do it OK. They also pointed me to an online source (www.bombich.com) that I haven't yet checked out.
    Thanks again,
    Dan

  • I tried to close Voiceover, then the display became dark. I can t see anything. What can I do?                                     ng. The voiceover still works. You can help me? Siggy from Germany.

    I tried to close Voiceover at iPod touch 4G, the display became dark, the Voiceobver still is talking, the battery is loaded. What can I do get brightness back? Siggy from Germany.

    You will also notice that your shift key will be emulated. Meaning that keys you will try to press will press but they will act like you are pressing the shift key when you are doing them.
    Try this, minimize the firefox window by pressing the tab on your taskbar. After doing that maximize it again. You will magically be able to click any link on your page. When you navigate to a new page however, the entire situation will start all over. My only remedy is rebooting and hoping it doesn't happen again soon.

  • How to close window that pop up other window

    hey , please help me
    How to I close window that produce pop window that produce the login page if the session is expired .How do I close the page produce that direct yo the login page that . below is coding used to validate if the page has expried .
    if (session == null ) {
         response.sendRedirect ("../mr_emplogin.jsp");
        //check whether the password still keep in session object
        HttpSession ses = request.getSession(false);
        ///if password removed
       if (ses.getValue("password") == null) {
            //go back to mr_emplogin.jsp
         session.invalidate();
         System.out.println("Your session has expired! Please login again!");
         response.sendRedirect ("../emplogin2.jsp");
        }How do desctroy the current session and close the window parent window. please help me any idea will do .It is quite emergency.
    Thank you

    I tried window.close() and self.close() both are giving me errors (I am certain the problem is with the script)..What does the error messages say? Is it a server error or a Javascript error?
    <c:redirect url="index.jsp"/>
    <script>
         function didit(){
         window.close()
    </script><c:redirect> sends a temporary redirect response to the client using the specified redirect location URL("index.jsp" in your case). Once you redirect, the response should be considered to be committed and should not be written to. The javascript codes that follow the <c:redirect> tag clearly violates this.
    If your objective is to close the window then why are you redirecting?

Maybe you are looking for