Regarding Exit plug

Hi,
I would like to open an URL in a button click and also I want to close the window in which I have clicked the button.
I am trying to use Exit plug of interface view.
Please comment on this.
Regards
Vivek

Hi,
Open some URL,
First u have to create outbound plug in interfaceview
1)Open the node WebDynpro -
> Web Dynpro Components -
> <ComponentName> -
> Component Interface -
> Interface Views in that click <interfacename> interface view .
2) Select the Plugs tab in the Plugs area.
3)Choose New next to the outbound plug table.create new outbound plug.for example,Name GotoUrl, and choose Type Exit Plug.
4)Select the new outbound plug GotoUrl and choose New next to the parameter table.taEnter the name Url datatype as STRING.
5)Open the view in the View Designer and select the Properties tab. Choose Add next to the Required Controllers table and add the <interface name>InterfaceView
Place 1 button and check,
onActionButton write this code
wdThis.wdGetSampleInterfaceViewController().wdFirePlugGotoUrl(
"http://www.google.com");
Closing Window:
onActionClose()
wdThis.wdGet<your interface view controller>().wdFirePlug<your exit plug's name>("javascript:void(window.close())");
Check this thread also,
close main application window in WD for Java

Similar Messages

  • Problem with POPUP and exit plug

    Hi together,
    in my case under certain conditions i create a popup window from a view with the method "if_wd_window_manager->create_popup_to_confirm( )"
    The popup displays an error or success message to the user and a "OK" button is available. I stored the popup window in the attributes of the underlying view. So an action "OK_BUTTON_PRESSED" of the view is assigned to the OK-button of the popup using method "if_wd_window->subscribe_to_button_event( )".
    In the action handler two commands are executed:
    1) closing the popup with "if_wd_window->close( ) method of the popup reference stored in the view attributes".
    and
    2) firing a navigation plug from the view to the underlying window which calls its own window exit-plug.
    Now my problem is that the popup window does not close when i leave the view with the navigation plugs. Without the plugs everything is working fine. It seems that the underlying view/window must still be available to close the popup.
    In my case the exit plug is called. I can see it because a new URL is called and i can see the new page but the modal popup is still there and not closed.
    Has anyone an idea how to solve that problem?
    Edited by: Dirk Jäckel on May 23, 2008 3:34 PM

    hi dirk......
             what you can do is first execute the close method and set an attribute to 'X' once this close is over. then in your wddomodify method of the view check for that attribute and fire that plug. so the firing should take place in the modify view method.
    ---regards,
       alex b justin

  • Closing window of web dynpro application with exit-plug don't run in the EP

    Hi everybody,
    I want to close a window that contains a Web Dynpro with a close button, because it's used and create as a popup from an other iView (that's not created with web dynpros) in the EP. I read the different threads how to close a window in web dynpro, like JavaScript in WD
    I create a HTML file with the javascript code to close the window and it works fine, when I start the application separately.
    If I used it in the portal and click the close button I get the following error message:
    com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Exit-Plug must no be triggered with an URL when running in portal. Use portal navigation instead to navigate to another application!
    I tried also: ...wdFirePlugExit("javascript:self.parent.close();") or some other javascript code, but got the same error message.
    Then I tried:
    WDPortalNavigation.navigateAbsolute(url,WDPortalNavigationMode.SHOW_INPLACE,(String) null, (String) null,(String) null);
    instead of fireing the outbound plug in the action of the close button
    (...InterfaceViewController().wdFirePlugExit(url);)
    but than a new window with the EP open and the old is still there!
    We use the NWDS2004s an the EP 7.00.
    It must be possible to close a (this) window!
    Thanks for any hint
    christian

    Hi,
       This is what you can do:
    1. You have already created the HTML file with the necessary javascript in the foloowing folder structure :
    src->Mimes->Components-><your component name>-><fileName.html>.
    2. Create a new iView of type URL in your portal.
    3. Get the absolute URL of this HTML file inside your project. This will be in the following format:
    http://<server>:<port>/webdynpro/resources/sap.com/<development ComponentName>/Components/<namespace>/<fileName>.html
    You can find it thus:
    try {
    String u = WDURLGenerator.getAbsoluteWebResourceURL(wdComponentAPI.getDeployableObjectPart(),"filename.html");
    wdComponentAPI.getMessageManager().reportSuccess(u);
    } catch (WDURLException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    4. Now enter this URL string as the URL for the iview.
    5. Do a normal portal navigation to this iview on-click of the button.
    Regards,
    Satyajit.

  • Problem in Using an URL in Exit Plug (NW 2004s SP12)

    Hi,
    I have a Webdynpro application to specify the terms and conditions for the users when they login to the portal for the first time.
    Upon Accepting the terms by the user, i used to loggoff the user and will redirect to the portal logon page again to relogin. (This was a requirment )
    I was using an exit plug with the URL pointing to loggoff.jsp which invalidates the session and redirect to the portal login page again. This was working fine in NW 2004.
    The code used to call the exit plug in the Window Interface view is,
    <b>wdThis.wdGetTermsandConditionsWindowInterfaceViewController().wdFirePlugToPortal("/globalportal/web/logoff.jsp");</b>
    When we upgarded into 2004s SP12 i am getting the folllowing error when firing the exit plug with the URL.
    <b>"The Exit Plug can not use an URL when used in Portal, use Portal Navigation instead"</b>
    We tried portal navigation as well, but seems that will work with PCD Objects only, where we need to redirect to the URL(logoff.jsp).
    I tried the HttpServletResponse.sendRedirect() as well, but the control remains in the TermsandConditions view only.
    <b>Code Used:
    WebCallback  webcallback = new WebCallback();
    HttpServletResponse response= webcallback.getResponse();
    response.sendRedirect(URL);</b>
    Please let me know if somebody faced this issue and the work around for this.
    My requirement is that upon clicking on the Accept button, i need to logoff the user by calling logoff.jsp will be destroy
    the session and redirect to portal login page.
    Please let me know the work around to call the URL in the view.
    Appreciate your reply.
    Thanks and Regards,
    Sekar

    Hi
    Try
    WDClientUser.forceLogoffClientUser(null);
    url - the URL of the page that is shown to the user after logoff was done. If the parameter is null, the redirect is done to the "LogoffURL" URL that can be specified in the application properties. If this URL is also not defined, a redirect to a Web Dynpro internal logoff page is done.
    So you may either accept default logoff-page (just text "Web Dynpro application terminated. Good bye!" or provide your own page via application properties).
    Next, it is impossible to just log-off to auth screen. It is necessary to set as log-off URL some application that requires authentication also.
    This way WD will first log-off user, then shows auth-screen and then login him again to the target application.
    So try the following:
    In NW IDE open your application properties, and add standard property "log-off URL", for example "/useradmin/userAdminServlet?userProfileView";
    Regards
    Ayyapparaj

  • Exit Plug not working in Portal

    Hi experts,
    I have a web dynpro application (WDP A) which fire an exit plug to another web dynpro application (WDP B). It works fine in normal web dynpro runtime. The architecture of the application is shown [here|http://img232.imageshack.us/img232/7172/exitplug.png].
    Now i have created an iView in the EP for WDP A. When the button which fires the exit plug is clicked, i get this error.
    com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Exit-Plug must no be triggered with an URL when running in portal. Use portal navigation instead to navigate to another application!
    Seems exit plug is not working in portal run time. Any one has an idea on how to solve this?? Use portal navigation?? What is that?? any guideline and documentation on that??
    Thanks in advance.
    Best Regards,
    kityein
    Edited by: kityein lai on Aug 5, 2009 10:04 AM

    Hi,
    Now that your WD apps are running in a Portal they should be more "Portal aware".
    What I mean is that now they are part of a larger framework and you cannot just call the other WD app.
    To do this properly (as the error message says) you should use the portal navigation.
    Portal navigation consists of many variants: Normal, Dynamic, Quicklinks etc etc.
    I personally advice to use Quicklinks if you want to navigate between 2 applciations running in the portal but are not native-portal apps. Altough this might not fit your requrements in this scenario, I cannot say....
    In addtions here are some help resources:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/38/5dc53e5ae84d3be10000000a11405a/frameset.htm
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/97/b0ef8b24a64ae884f0ab246e54cae5/frameset.htm
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/43/00c110606a5277e10000000a1553f7/frameset.htm
    Hope this helps you a bit...
    Benjamin Houttuin

  • WDRuntimeException: Exit-Plug must no be triggered with an URL when running

    Dear SAP,
    In our SRM-JAVA system, when I am leaving a web page, I get this error :
    The initial exception that caused the request to fail, was:
    com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Exit-Plug must no be triggered with an URL when running in portal.
    Use portal navigation instead to navigate to another application!
    at com.sap.tc.webdynpro.progmodel.view.View.navigate(View.java:516)
    at com.sap.tc.webdynpro.progmodel.view.View.navigate(View.java:462)
    at com.sap.mdm.srmcat.uisearch.master.wdp.InternalMasterWindowInterfaceView.wdFirePlugToApplicationPlugOUT
    (InternalMasterWindowInterfaceView.java:205)
    at com.sap.mdm.srmcat.uisearch.master.Master.callOCIComponent(Master.java:1119)
    at com.sap.mdm.srmcat.uisearch.master.wdp.InternalMaster.callOCIComponent(InternalMaster.java:940)
    ... 32 more
    More detail :
    com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Exit-Plug must no be triggered with an URL when running at com.sap.tc.webdynpro.progmodel.view.View.navigate(View.java:516)
    at com.sap.tc.webdynpro.progmodel.view.View.navigate(View.java:462)
    at com.sap.mdm.srmcat.uisearch.master.wdp.InternalMasterWindowInterfaceView.wdFirePlugToApplicationPlugOUT(at com.sap.mdm.srmcat.uisearch.master.Master.callOCIComponent(Master.java:1119)
    at com.sap.mdm.srmcat.uisearch.master.wdp.InternalMaster.callOCIComponent(InternalMaster.java:940)
    at com.sap.mdm.srmcat.uisearch.master.MasterView.onPlugfromResultSetViewIn(MasterView.java
    Thanks in advance for your input.
    Best regards
    SAP NetweaverAdmin
    Edited by: SAPNetWeavAdmin on Jan 14, 2011 7:11 PM

    Hi,
    could you please take a look at the following SAP note and see if this is relevant for you?
    1450826 - Error when SLD administration called in portal environment
    About your problem, is this happening every time you leave a web page?
    Regards,
    Jonas Cella

  • Replacement of Exit Plug to navigate to some URL

    Hi All
    After upgrade from Netweaver2004 to 2004s,
    Webdynpro application doesnt support Exit Plug to navigate to some URL, when webdynpro application is run in Portal.
    It gives following errors
    <b>com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Exit-Plug must no be triggered with an URL when running in portal. Use portal navigation instead to navigate to another application</b>
    I tried using <b>WDPortalNavigation.navigateAbsolute</b>, but it is not working as expected.
    Please guide me what can be done
    Thanks and Regard
    Sonal Mangla

    Hi Sumit
              String deployableObjectName =
                   wdComponentAPI.getDeployableObjectPart().getDeployableObjectName();
                   WDDeployableObjectPart deployableObjectPart =
                        WDDeployableObject.getDeployableObjectPart(
                             deployableObjectName,
                             "IsrlAddrApp",
                             WDDeployableObjectPartType.APPLICATION);
                   // Get the URL of the application
                   String urlToTargetApp =
                        WDURLGenerator.getApplicationURL(
                             deployableObjectPart,
                             new HashMap());
    and now passing <b>urlToTargetApp</b>.
    I am not sure WDPortalNavigation.navigateAbsolute works for such urls also or does it work for only pcdid paths.

  • Details on Exit plug

    Hi,
    I am working on Webdynpro for ABAP and would like to implement the Exit Plug functionality.
    Can any one provide me one sample program for my reference, so that it would be easy for my development.
    Regards,
    Ramya.

    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webas/webdynpro/tutorial%20on%20creating%20an%20extended%20web%20dynpro%20application%20-%202.htm">Creating an Extended Web Dynpro Application</a>
    Topics covered:
    Creating a Web Dynpro application with multiple views and a more complex navigation structure
    Working with actions and event handlers
    Reading contents from the property resource bundles and storing them in a Web Dynpro context
    Dividing data between view controllers and component controllers using context mapping
    Manipulating UI element attributes at runtime using data binding
    <b>Leaving a Web Dynpro Application using an exit plug</b>
    Valery Silaev
    EPAM Systems
    http://www.NetWeaverTeam.com
    P.S. Hint: always check <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/developerareas/webdynpro?rid=/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d">web Dynpro Sample Applications and Tutorials</a> section before posting question.

  • Error while firing a WD Exit Plug in Portal :(

    Hello All,
    Am new in WD and created the Quiz Demo Application referring to help.sap.com.
    I have added a URL to the Exit plug as:
    wdThis.wdGetQuizInterfaceViewController().wdFirePlugGotoUrl("http://toyouamit.googlepages.com/home")
    The application is working fine when run while deploying (from NWDS). But when run from the WD iView, the exit plug gives the following error:
    com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Exit-Plug must no be triggered with an URL when running in portal. Use portal navigation instead.
    In attempt to resolve this we have created an URLiView but in vain!!
    Please guide
    Awaiting Reply.
    Thanks & Warm Regards,
    Ritu

    Hi,
    the error tells it:
    "Exit-Plug must no be triggered with an URL when running in portal. Use portal navigation instead."
    See here: http://help.sap.com/saphelp_nw2004s/helpdata/en/56/b4544251dcc153e10000000a1550b0/frameset.htm
    There is also another thread where this was discussed, you can find some hints to implement portal navigation:
    Closing window of web dynpro application with exit-plug don't run in the EP
    Kind Regards
    Stefanie

  • Exit plug - Error when tyring to close application

    Hi,
    I get the following runtime error when trying to close my WD Application:
    -> Parameters of exit plugs and suspend plugs must be of type STRING or TIHTTPNV
    My outbound plug og type exit takes 1 parameter:
    CLOSE_WINDOW of type Boolean.
    My code for calling the exit plug:
    DATA: l_ref_main_window TYPE REF TO ig_main_window .
      data: l_close_window TYPE boolean.
      l_close_window = 'X'.
      l_ref_main_window =   wd_this->get_main_window_ctr( ).
      l_ref_main_window->fire_exit_plg( close_window = l_close_window ).
    Thanks,
    Morten

    Hi Morten,
    There are certain restrictions or certain conditions to be considered before using the CLOSE_WINDOW  parameter in the exit plug, you may find them here.
    http://help.sap.com/saphelp_nw70/helpdata/en/45/1bc575ba064574e10000000a114a6b/frameset.htm
    Regards,
    Runal

  • Trigger the exit plug of a standard application from enhancement

    Hi,
    I've enhanced a standard web dynpro application and placed a view and window in the enhancement. Now from that view, I want to call the exit plug of the standard application. How do I achieve the same?
    Thanks
    Nidhi

    Hi Nidhi,
    In order to call the EXIT plug of the standard Window, firstly you need to create an Outbound plug from your view.
    Enhance your Standard application by creating another Inbound plug in the window which contains the EXIT plug.
    Now to create a Navigation link from the Outbound plug created, and the enhanced Inbound plug created in the Standard Component.
    Now in this Inbound plug created in the Standard component, call the EXIT plug of the window present in that Standard component's Window.
    I hope the process is clear.
    One of my assignments has the same requirement and did the same.
    Hope it helps.
    Thank you,
    Good day!
    Regards,
    Shashikanth. D

  • How to define exit plug for interface view?

    hi experts,
                  I am trying to define exit plug for interface view , but i am not able to make interface view into change mode. it doesnt allow me. what should be done/
    Thanks,
    saurin shah.

    Hi ,
           Check the Interface in the Window this will reflected in the Interface Window
    Regards
    Vikranth

  • Usage of Exit Plugs

    Dear All,
    Please give me the scenario where we should use an EXIT plug to close an application.
    In which hook method should the plug be fired?
    What are the possible parameters of the plug?
    Thank you.
    Regards,
    Prosenjit.

    hi,
    Please give me the scenario where we should use an EXIT plug to close an application.
    there are two scenarios :
    1. When you want to close a Window.
    2. When you want to open new window by giving the URL.
    What are the possible parameters of the plug?
    There are two parameters of this plug:
    1. URL of type String.
    2. Close Window type boolean.
    In which hook method should the plug be fired?
    You can call this plug on any ONAction.
    Ex :
    Do the following steps :
    -> Make an Outbound Plug to the Window.
    ->Make the type of Outbound plug to Exit Type.
    ->Add URL of type String as a parameter to the outbound plug of Window.
    ->Do remember to add Component Name in the Properties Tab of View ( othervs Calling Outbound plug of window from view wont b possible ).
    To open a new URL with closing the previous one write this Code in OnAction of Button : ( this Code can be get from Code Wizard too ).
    DATA lo_zexit TYPE REF TO ig_zexit . <zexit is name of my Component>
    lo_zexit = wd_this->get_zexit_ctr( ).
    lo_zexit->fire_out_window_plg(
    url = 'http://www.google.com' " string
    Similarly you can do for Closing a Window using parameter Close Window.
    Thanx.
    Edited by: Saurav Mago on Apr 17, 2009 10:32 AM

  • WDRuntimeException: Exit-Plug must no be triggered

    Dear gurus
    i  am getting this error while in JCo
    The initial exception that caused the request to fail, was:
       com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Exit-Plug must no be triggered with an URL when running in portal. Use portal navigation instead to navigate to another application!
        at com.sap.tc.webdynpro.progmodel.view.View.navigate(View.java:516)
        at com.sap.tc.webdynpro.progmodel.view.View.navigate(View.java:462)
        at com.sap.sld.wd.main.wdp.InternalMainInterfaceView.wdFirePlugToOldUI(InternalMainInterfaceView.java:154)
        at com.sap.sld.wd.main.Head.onActionAdministration(Head.java:277)
        at com.sap.sld.wd.main.wdp.InternalHead.wdInvokeEventHandler(InternalHead.java:227)
        ... 29 more
    Any help
    Thanks and Regards

    Hi Balaji
    Were you able to solve the problem? I'm aslo getting the same problem.
    Regards
    Kaleem

  • Exit plug url parameters without XSS encoding

    Hi,
    I fire an exit plug with POST_PARAMETERS = 'X' and passing a different postParameters='sap-client=101&sap-user=5E224C57E11&sap-password=Asdf1234'. However the special characters are encoded and not passed correctly to the webdynpro app.
    I got this behavior from CREATE_EXTERNAL_WINDOW with USE_POST = abap_true settings. I am trying to hide the sap-user and sap-password from the URL when redirecting to a new WebDynpro app in the same way, but remain in the current window.
    My question is how can I prevent the automatic XSS encoding? I have turned off the login XSRF flag in SICF, but it has no effect on this.
    Another option if somebody can tell me how can I do the same as CREATE_EXTERNAL_WINDOW in the same window, it should also be fine.
    Your help is appreciated.
    Charlie

    >
    Frederic Wood wrote:
    > Thank you Frank!  This accomplished exactly what I asked.  Points awarded!
    >
    > However...
    >
    > What is bugging me now is the fact that the BSP app is processed on the lo_client->send( ) and my POSTed parameters are visible, but the BSP is not displayed.  Then, when I actually Fire my WD outbound plug to display the BSP, the BSP is processed and displayed, but the POSTed parameters have been lost... 
    >
    > Your thoughts?
    That is because there are two very different calls to the BSP application occuring. The solution that you said worked is using the HTTP Client (browser if you will) of the application server.  Therefore it is the ABAP system itself that is calling the BSP application.  That is why nothing is displayed on the client side - because the server itself is making the request and receiving the response.  This approach is really only usable if you need to call a data service (REST based or something like that), not if you actually need to dispaly the response to the user.
    When you fire the navigation plug, it is the browser on the client machine that is making the request to the BSP application. This is completely separate from the request made from the application server in the previous step. 
    If you can't use GET and URL parameters, then you should just consider using Server Cookies.  I don't think that hte HTTP Client class approach is going to get you what you want.

Maybe you are looking for

  • Drag and drop a table column?

    Hi All gurus. Is it possible to drag a standard table as well as an ALV table column? To re-phrase my question, I want to swap the positions of 2 columns in a table. Possible? Thanks in adv!

  • When I delete email the app closes when it begins to open a certain email and all of the email I deleted are back

    When I try to delete email, one of them, causes the app to close and then the email I did delete repopulate in my inbox. How do I get rid of this?

  • Dimmer and volume keys not working on keyboard

    I went to up my volume from the f5 key on my keyboard and it didn't work. I tried to dim and lighten the screen and that too didn't work. Any suggestions on how to resolve this situation?

  • Release 4.2?

    Hi there, good people! I'm wondering if there is any word on when release 4.2 may be released externally? Mr. Stephenson, you'd mentioned in an earlier post that 4.2 would be certified against JRE 1.4, but then I read in the release notes for 4.1.16

  • Epson stylus cx 3800 won't work after upgrade to osx 10.9

    I installed OS X 10.9 on my MacBook Pro and now my printer Epson Stylus CX 3800 won't work. I uninstalled the printer and tried to reinstall with original epson software but computer won't download it. Perfectly good printer worked yesterday but not