Fire WindowInterfaceView outbound plug

For my webdynpro I use cross-component navigation.
From ComponentA, ViewA i'm using a plug to navigate to ComponentB, ViewB.
Now I want to navigate back to ComponentA, ViewA when the user press Cancel.
I created a outbound plug in my WindowInterfaceView with a link to the inbound plug from viewA.
How can I fire this plug in the WindowInterfaceView from ViewB?
Regards,
Björn

Hallo B.
what's the problem? You just apply the same technique twice.  You navigate back to CompB from CompA just like you navigated from CompB to CompA before?
You declare an additional outbound plug on the interface view of CompB and link it to an interface view inbound plug of CompB.
Firing the outbound plug from WindowInterfaceView (you mean ComponentInterfaceView which is 1:1-related with a Window inside the component) is explained in the tutorial:
public void onActionNavigateBackToUICompB( com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, int targetView )
//@@begin onActionNavigateBackToUICompB(ServerEvent)
wdThis.wdGetUICompAInterfaceViewController() .wdFirePlugBackToOtherCompOut(targetView);
//@@end
I allready adapted the code to your question.
Regards, Bertram

Similar Messages

  • Fire outbound plug from view in a DC to the interface view.

    I have a DC1 which has a view.From this View I fire a outbound plug with a string parameter to an interface View's inboundplug with the string parameter.This view is in another DC2 and used DC in DC1.
    Now when I try to Build the DC1,I get build error with the error log saying that the plug parameters arent compatible.But both the parameters are of same type.

    Hallo Kent,
    as long as your Comp A component keeps alive it also keeps it state when leaving it via navigation. By setting its lifecycle property as "manual" you can manage the lifecycly of Comp A on your own. This means the Web Dynpro Java Runtime will not destroy this component instance when leaving it via navigation.
    To navigate back you can apply the cross-component navigation technique I described within my tutorial on https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/webcontent/uuid/751d003a-0b01-0010-8996-afbaa3fd5339">cross-component [original link is broken] [original link is broken].
    Regards, Bertram

  • Web Dynpro: several navigation links connect to one outbound plug of a view

    Hi,
    I have two questions in general Web Dynpro. (I have not found precise answer for the question yet)
    1) What should happen in the following case?
    We have three views in a component. The outbound plug of the first view is connected to the inbound plug of the second and third view via navigation links. Which view should appear, if i fire the outbound plug of the first view?
    Some documentation says, this case is not allowed, some documentation says it is allowed...
    2) If the previous case is allowed, what should happen in the following case?
    In a child component, a window outbound plug is connected to a view inbound plug. Beside this, I implement an inbound plug of the window, where i fire this outbound plug of the window.
    Now, the interface view is embedded into a parent component window. In the parrent component I connect the outbound plug of the interface component to an inbound plug of a parent view (which is also embedded into the window). I also connect an outbound plug of the parent view to the interface view inbound plug.
    What will happen if I fire the parent view outbound plug? Will the parent view or child view appear?

    Hi Huszar,
    I'm a newbie and found your question interesting. So I played a little with this issue and hope I found something to help you.
    But  I wonder in why you want to use such a constellation the first place. What is your purpose? For me the idea itself doesn't make much sense... Did you by chance actually think of one of the following purposes:
    You want two different action elements (e.g. 2 buttons) to fire different conenctions. Then you should use different outbound plugs. Connect the two buttons and the two links to different methods so that the corrsponding plug and button have the same method.
    You want to decide by value or state which view to show. Then you should use two different outbound plugs as well and decide in the button's event handler mehtod which plug to fire , e.g.: if <condition> then <firePlugA> else <firePlugB>.
    Generally, if you connect two views in a window via link you must chose a method to use or create a button. If you chose a method (event handler) the effect in the Java file is that the  method (onActionButtonX()) will call the corresponding firePlugOut-method.
    Unfortunately in the firePlug-method itself there was no hint about the plug's destination. As I connected the same method for button and two plug targets, Web Dypro for no obvious reason always chose the same target. I did not find a possibility to directly chose the target from one outbound plug, so I guess this information is stored somewhere in the background logic.
    Did I get the point or did you think of something completely different? Or maybe you just asked theoretically? In that case I don't seem to get the idea.
    Kind regards,
    Jana

  • Fireing outbound plug of interface view from within component

    Hi all,
    is there a better way of firing an outbound plug of an wd component interface view than from within the interface view controller itself?
    The problem is, that you easly get a cyclic reference if you evaluate inbound component plugs in the interface controller (usage from int view ctrl --> int ctrl needed) and then try to fire an outbound plug from this interface controller (usage comp int --> comp int view usage needed).
    One workaround is to use some custom controller with usage of the interface view, but this doesn't seem to be a nice solution.
    So is it possible to fire outbound comp plugs from, lets say the component controller - without any usage releation to the comp int view - instead, maybe via wdComponentAPI? If yes, could you provide a code snippet?
    Thanks you and best regards,
    Christian

    Hi Christian,
    this is not possible by using the public API only, i'm afraid. It is of course possible, if you decide to forget about the possible drawbacks of using methods and classes reserved for internal use. But you have to use it at your own risk. I hacked this together some weeks ago, don't know whether it still works
    * Fires an outbound plug of an interface view with parameters.
    * @param wdComponentAPI Component API "owning" the interface view.
    * @param windowName Name of window
    * @param plugName Name of outbound plug
    * @param callerParameterMap optional Map of plug parameters.
    public static final void fireOutboundPlug(
      IWDComponent wdComponentAPI,
      String windowName,
      String plugName,
      Map callerParameterMap)
      throws WDRuntimeException {
      // Find window requested
      IWDWindowInfo windowInfo = wdComponentAPI.getComponent().getComponentInfo().findInWindows(windowName);
      if (windowInfo == null) {
        throw new WDRuntimeException(
          "Can't find window: " + windowName + " in component: " + wdComponentAPI.getQualifiedName());
      // Get info of interface view
      IWDInterfaceViewInfo ifViewInfo = windowInfo.getInterfaceView();
      if (ifViewInfo == null) {
        throw new WDRuntimeException("Window: " + windowName + ", no interface view info found");
      // Find outbound plug
      IWDOutboundPlugInfo outboundPlug = ifViewInfo.findInOutboundPlugs(plugName);
      if (outboundPlug == null) {
        throw new WDRuntimeException(
          "The interface view: " + ifViewInfo.getName() + " has no outbound plug: " + plugName);
      // Parameter passing
      Collection plugParameters = outboundPlug.getParameters();
      // TODO make check optional, check caller map parameter keys against existing
      if (plugParameters == null || plugParameters.isEmpty()) {
        // No caller parameters allowed.
        if (callerParameterMap != null && !callerParameterMap.isEmpty()) {
          throw new WDRuntimeException(
            "The outbound plug: " + plugName + " has no parameters, callerParams must be empty/null.");
      // TODO This is a hack, use of internal WD runtime classes and methods (don't use productive).
      InterfaceView ifViewController =
        (InterfaceView) ((Component) wdComponentAPI.getComponent()).getController(ifViewInfo.getName());
      ifViewController.navigate(outboundPlug.getName(), callerParameterMap);
    Please remember, that not everything which is technically possible, makes sense
    Regards
    Stefan

  • How to fire outbound plugs of a window?

    I have a component which I want to re-use in applications. The component should have 2 outbound (interface) plugs which can be wired into parent applications. When the user clicks buttonA in the component it should fire outboundPlugA, likewise for buttonB we have outboundPlugB. My problem is that I can only seem to fire outbound plugs of the view and not of the window.
    Until now, we've solved this by firing interface events of the component controllers but it seems plugs would be more elegant.
    How does one fire outbound plugs of the window?

    OK, I've done what you said and have the following in the event handler (action of a button) in my view:
      DATA:l_ref_test TYPE REF TO ig_comp1_window.
      l_ref_test = wd_this->get_comp1_window_CTR( ).
    The compiler error message is:
    Method "GET_COMP1_WINDOW_CTR" is unknown or PROTECTED or PRIVATE.
    This method does not exist as far as I can see.

  • Fire Outbound-Plug of Window in Componentcontroller

    Hello,
    i have defined a Component Interface Definition with an Interface-View (ZYEX_CID).
    One WD component (ZYEX_C) implements this ZYEX_CID.
    I have defined an additional outbound-Plug TO_X in Window inherited from ZYEX_CID.
    In the component controller of ZYEX_C i fire this additional outbound-Plug (component controller of ZYEX_C uses the window controller).
    At runtime an error is issued - outbound-Plug TO_X does not exit in ZYEX_CID.
    Error occurs only if i use ZYEX_C in another WD-Component via interface ZYEX_CID.
    Implementation of ZYEX_CID is provided via Application configuration.
    If i use ZYEX_C directly (not via interface) error ist not issued.
    Thanks.
    Regards
    Paul

    Hi ,
       Just check the provided out bound plug is marked as interface plug .  Then only you can fire this plug from the using component .

  • Why does fire outbound plugs sometimes don't work

    Hello.
    Can someone of you tell me what the reasons are that sometimes the firing of a outbound plug don't do the navigation?
    Many thanks,
      Mathias

    Check in the window if you have created the navigation link between the views. After defining the plugs, only if the navigation link is created, the plug will be fired properly. This could have been missed, have a look.
    Regards,
    Nithya

  • Fire outbound plug of interface view controller?

    Hello Experts-
        In my WD project I have two apps A and B.
        I need to navigate from app A to app B.
        In the interface view controller of app A, I have created an outbound plug called GotoB.
        I determine the URL of app B using the WDURLGenerator and store that value in a string.
        In a view of the app A I have the code:
    <code>
    wdThis.wdGetAInterfaceViewController().wdFirePlugGoToB("URLtoB");
    </code>
        For some reason nothing seems to be happening when the event triggers in the view of app A that runs the above code. The view of app A just seems to refresh. The one thing that does happen is that on the refreshed view of app A if I click on the button to trigger this event again I get an 'app A has expired' WAS error.
        What am I missing here? How can I make the navigation from app A to app B work?
    Thank you,
    - Vik.

    Hi,
    well step by step:
    1) Create component Component1 (package="com.sap.sdn", window name = "Component1CW", View name="Conponent1CV")
    2) Create component Component2 (package="com.sap.sdn", window name = "Component2CW", View name="Conponent2CV")
    3) Create application "App1" (package="com.sap.sdn", Web Dynpro component="Component2", the rest - by default)
    4) In Component1CWInterfaceView create outbound plug "GoToComp2"
    5) In Conponent1CV add Component1CWInterfaceView as required controller
    6) In Conponent1CV add button and in action handler put following:
      public void onActionGoToComp2(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionGoToComp2(ServerEvent)
        wdThis.wdGetConponent1CWInterfaceViewController().wdFirePlugGoToComp2();
        //@@end
    7) In component Component2 add Component1 as Used Web Dynpto Component (name="Component1CU")
    8) In Component2CW embed view (Component1CWInterfaceView) as Embed Interface View of a Component Interface, and set this view as default.
    9) In Component2CV add inbound plug "FromComponent1"
    10) In Component2CW link embedded View Component1CU.Conponent1CWInterfaceView.GoToComp2 with Component2CV.FromComponent1
    11) Build-deploy-run. Click on button. It should work.
    Regards, Maxim R.

  • View controller active after navigating via outbound plug, is this normal

    Hallo,
    I have two components (comp_a,comp_b).
    comp_a->grid_view_a : fires a event.
    comp_b->grid_view_b : subscribe to the above event.
    My observation is that
    When comp_a->grid_view_a fires a event and comp_b->grid_view_b listen to that event and the Grid is filled accordingly.
    Now i navigate from comp_b->grid_view_b to comp_b->display_view_b  firing a outbound plug.
    Now if i change the selection in comp_a->grid_view_a and it fires a event. I was expecting that nothing happens in comp_b as the subscribed comp_b->grid_view_b is not in the assembly. But to my surprise, the event handler is called and processed while the user still watching/working on the comp_b->display_view_b.
    Has anyone encountered with this problem ?. I was not having this problem a month ago. Could have been introduced in one of our Kernel/Sp updates.
    Your reply is highly appreciated.

    Hallo,
    I have two components (comp_a,comp_b).
    comp_a->grid_view_a : fires a event.
    comp_b->grid_view_b : subscribe to the above event.
    My observation is that
    When comp_a->grid_view_a fires a event and comp_b->grid_view_b listen to that event and the Grid is filled accordingly.
    Now i navigate from comp_b->grid_view_b to comp_b->display_view_b  firing a outbound plug.
    Now if i change the selection in comp_a->grid_view_a and it fires a event. I was expecting that nothing happens in comp_b as the subscribed comp_b->grid_view_b is not in the assembly. But to my surprise, the event handler is called and processed while the user still watching/working on the comp_b->display_view_b.
    Has anyone encountered with this problem ?. I was not having this problem a month ago. Could have been introduced in one of our Kernel/Sp updates.
    Your reply is highly appreciated.

  • Problem in construct_url and firing outbound plug data passing

    Fnds,
    I have been posting this but no one was able to help me specifically.
    I am calling other WDA2 from WDA1.. i used construct_url, and called the outbound plug which is type suspend.
    so wda2 is opening in same browser. .good.
    but i want to send a value to the URL .. basically i can see parameter in outbound plug as url..
    but how to pass the value to URL..
    and in WDA2, how to read this value... pls plsssssss..
    i know its simple, but i need some sampel code or example which reads this value of URL.
    kindly help me..
    Niraja

    Hi Nirja,
    You must have done this coding to call WDA2.
      DATA lv_url TYPE string.
      CALL METHOD cl_wd_utilities=>construct_wd_url
        EXPORTING
          application_name = 'ZWDA2'
        IMPORTING
          out_absolute_url = lv_url.
      CONCATENATE lv_url '?sap-client=' sy-mandt '&sap-language=' sy-langu '&PARAM1=' <P1> '&PARAM2=X'
      INTO        lv_url.
      wd_this->fire_out_plg( url = lv_url ).
    here out is suspend plug of WDA1.
    now here is the code u need to do the coding in HANDLEDEFAULT method of default window of WDA2 to get the parameter passed by WDA1.
      DATA ls_url TYPE LINE OF tihttpnvp.
      DATA lt_url TYPE tihttpnvp.
      wdevent->get_data(
      EXPORTING
        name = if_wd_application=>all_url_parameters
      IMPORTING
        value = lt_url ).
      LOOP AT lt_url INTO ls_url .
        CASE ls_url-name.
          WHEN 'PARAM1'.
            <your logic to handle value of param1
          WHEN 'PARAM2'.
            <your logic to handle value of param2
          WHEN OTHERS.
        ENDCASE.
      ENDLOOP.
    moreover you need to fire simpel exit plug in WDA2 to get back to WDA1. And obviously you will have to define resume plug in WDA1.
    Hope you will be having enough clarification.
    -Haresh
    Edited by: Khandal Haresh on Nov 7, 2008 5:00 AM

  • Why do we need mention explicitly for Outbound plugs?

    Hello
    When i see a existing custom WD component's my_view's method code (action is APPROVE), i  see the below code
      wd_this->fire_tomain_plg( ).
    I also saw that MAIN view is the outbound plug for my_ view.
    1) Is this code is telling to the system that, it should navighate to MAIN view?
    2) if so, already we put this (TOMAIN) in OUTBOUND tab righ? why again having this piece of code EXPLICITLY in our method?
    3) is we (developers) need to put this manually? or or systme will put it at the bottom of the method automatically?
    4) but i did not see any such code for INBOUND PLUGs? why?
    Thank you

    ABAP_SAP_ABAP wrote:
    Hello
    >
    > When i see a existing custom WD component's my_view's method code (action is APPROVE), i  see the below code
    >
      wd_this->fire_tomain_plg( ).
    >
    > I also saw that MAIN view is the outbound plug for my_ view.
    >
    > 1) Is this code is telling to the system that, it should navighate to MAIN view?
    >  YES.
    > 2) if so, already we put this (TOMAIN) in OUTBOUND tab righ? why again having this piece of code EXPLICITLY in our method?
    >  In the outbound tab, you are specifying list of outbound plugs which can be used. however you need to fire the correct outbound plug via coding.
    > 3) is we (developers) need to put this manually? or or systme will put it at the bottom of the method automatically?
    >  You need to fire outbound plug for navigation. You can use WDA wizard to do that.
    > 4) but i did not see any such code for INBOUND PLUGs? why?
    >   We maintain navigation link b/w outbound and inbound plug at Window. This will automatically fire inbound plug corresponding to outbound plug.
    > Thank you

  • CRM 2006s Transaction Launcher via Outbound plug

    Hi,
    I'm using CRM 2006s and want to launch a URL from a button in a toolbar (not the navigation bar).
    In CRM 2005 you would created a transaction launcher and via navigational links call IC_BASE\ABoxExecution and set the id using cl_crm_ic_cucoaction_impl=>set_action_id_no_formatting.
    However in CRM 2006s, IC_BASE is not the frame work BSP so therefore this call will not work. 
    Can anyone please assist on however to fire a URL via a outbound plug?
    cheers and greatly appreciated.
    Joe

    Thought I found the answer but still no luck.  Anyone help...

  • Outbound plug of a view_container_uielement

    Dear Developers,
    Is there any kind of "outbound plug" for a view_container_uielement ?
    Actually I would like to detect when a view contained in a view_container_uielement has reached an outbound plug. This would then me allow to jump out of the view containing the container.
    Does it sound reasonable? Possible?
    Sincerely,
    Olivier MATT

    Hi Sascha,
    The prepare_dynamic_navigation is made to put any view at runtime in the <i>view_container_ui_element</i>.
    Here is my schema:
    <b>V1  -
    outboung plug -
    > V3
    |---- VIEW_CONTAINER_UI_ELEMENT
    ####|---- V2 ( this V2 is determined at runtime)</b>
    Now V2 raises an event which is caught by V1. V1 fires its outboung plug to V3.
    V3 WDDOINIT is loaded but the content of my browser is not refreshed, and I am still in V1 (with V2 still displayed in the view_container_ui_element and the other UIElements).
    Here is the coding for th embedding of V2 in the VIEW_CONTAINER_UI_ELEMENT ( sorry but the names used in the coding do not match with the previous definitions in the schema ).
    data: l_ref_cmp_usage type ref to if_wd_component_usage,
          L_VIEW_CONTROLLER_API type ref to IF_WD_VIEW_CONTROLLER.
    * we get the taskselection component
    l_ref_cmp_usage =   wd_This->wd_CpUse_Usage_Taskselection( ).
    * we embbed the component in the viewcontainerUIelement
    L_VIEW_CONTROLLER_API = WD_THIS->WD_GET_API( ).
    L_VIEW_CONTROLLER_API->PREPARE_DYNAMIC_NAVIGATION(
                  source_window_name          = 'MAINWINDOW'
                  source_vusage_name          = 'TASKSELECTIONVIEW_USAGE_1'
                  source_plug_name            = 'PLUGOUT'
                  target_component_name       = 'ZWD_TASKSELECTIONCOMP'
                  target_component_usage      = 'USAGE_TASKSELECTION'
                  target_view_name            = 'SELECTIONWINDOW'
                  target_plug_name            = 'DEFAULT'
                  target_embedding_position   = 'TASKSELECTIONVIEW/VIEW_CONTAINER_UIELEMENT' ).
    Again, I do not want to fire the V2 outbound plug but V1 outboung plug in order to jump to V3.
    So if you have, as usual a great idea Sascha, let me know
    Regards,
    Olivier MATT
    Message was edited by:
            Olivier Matt
    Message was edited by:
            Olivier Matt

  • Help Needed-Doubt in Outbound Plug Delegation

    Hi Experts,
    We had a requirement to create a view for displaying opportunities and provide navigation to the same from the view.
    We were getting exceptions for incorrect implement and we solved it using the delegation concept.
    Doubt:
    In our Z component window we have Outbound Plugs namely navigate_display,navigate_create and navigate_edit.
    But in our component usage we are using BT111M_OPPT component which has an OP DOCFLOW that need to be delegated as well for proper navigations to happen. The OPs of  BT111M_OPPT navigate_display and navigate_create has been delegated to OPs navigate_display and navigate_create of our Z component window respectively.
    Since we do not have a DOCFLOW OP in our Z component, is it correct if we delegate it to an available OP(say,navigate_display -  this has been currently done and it is working fine now) or should we create an OP and den fire DOCFLOW OP within the same in our z component window?
    Any pointers would be highly appreciated.

    Hi,
    Thanks for the reply.
    My doubt is now about the flow of the firing.
    While using navigational link concept,it just finds source and target as defined and navigates accordingly...but in this case
    i am unable to arrive at such a conclusion.
    My Z component had OPs in window : A,B,C.
    I embedd a std. component in my z component. Std. component has window OP D.
    I delegate the window OP of the std. component(D) to my Z component window OP(A).
    Which OPs should be triggered within D and A(param iv_outbound_plug value to be passed to the fire method)?
    So what would be the flow of the firing in two cases : 1. If i am navigating to the embedded view ?
    2. If i navigate back to z component view?
    Like i am not clear about the basic flow concept on the firing of OP of window and so i am confused about the usage.
    Please help if you knwo any link where i can get an idea about the same.
    I searched sdn but not to much avail.
    Thanks
    Swapna

  • Is it possible to Create dynamic outbound plug and it's navigation link?

    Hi,
    i am trying to create an outbound plug in runtime dynamically, is it possible?
    I have found out how to create the outbound plug in wdDoModifyView: "<b>view.getViewInfo().createOutboundPlug()</b>"
    but the problem is how do i set the plug name, and how do i create it's navigation link to bind him to an inbound plug in another view.
    Thanks,
    Carmit

    Hi Carmit,
    the following code snippet creates a link between a newly created outbound plug (outbound plug name is not really necessary) and an already existing inbound plug:
    /* targetViewInfo is the IWDAbstractViewInfo of navigation target
       srcViewInfo is the IWDAbstractViewInfo of navigation source
       Find inbound plug, must exist */
    IWDInboundPlugInfo targetPlug = targetViewInfo.findInInboundPlugs(inboundPlugName);
    /* Create outbound plug with "automatic" name */
    IWDOutboundPlugInfo srcPlug = srcViewInfo.createOutboundPlug();
    /* Create link from out to in */
    IWDNavigationTargetReferenceInfo targetReferenceInfo =
      srcViewUsage.createNavigationTarget(srcPlug.getName(), targetViewUsage, targetPlug.getName());
    /* Fire srcPlug somewhere...*/
    Hope that helps.
    Regards
    Stefan

Maybe you are looking for

  • Error while creating a new entity row in Create Page

    Hello all, I am facing a problem while coming to the Create Page from the Search page.In the process request of the controller i am initializing the row of the table like below public void createxx() xxVOImpl vo = this.getxxVO1(); vo.setMaxFetchSize(

  • Problems With The  eGatetutorial Java Caps

    Hello i'm learning to use Java caps and i use the tutorial but when i create my project all run but my output data has don't created i put the directoy where is my xml file c:\eGate\Project3\*.xml this is in the input file and the output file i can't

  • Windows Installer 5.0

    Please, via which link can I obtain windows installer 5.0? Your prompt response is keenly awaited and appreciated. Thanks!!!

  • AQ wild behavior

    I've wrote a PL/SQL procedure which sending JMS TxtType messages to oracle queue. Another PL/SQL procedure can dequeue and process this messages, what I really need is read this messages by Java JMS programm on client site. Here the output from java

  • 4 Billion Standby time?! What's going on?

    Check this out 4 billion days on standby. I don't know what is going on. I'm having problems with my time. Every now and then my time would be 3 hours ahead. When I took this shot it was 9am. On the photo it says 12pm. After a couple of minutes it co