Firing the Suspend Plug of Interface View Controller of1 DC from another DC

Hi Experts,
Can you please let me know if it is possible to fire a suspend plug from a Component Controller?
I've been tried it before from View controller on some event and was able to fire the plug successfully but when I am trying to fire the same from the init method of the Component Controller or init method of the view controller, it gives me the below error:
com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Instance of interface view controller XXXXCompInterfaceView does not exist.
I believe that it is not possible to fire the suspend plug from the Init method  of either Component Controller or View Controller.
So, is it possible to fire the suspend plug in one custom method of a component controller if the custom method is called from some another component?
Please let me know.
Thanks & Regards,
Anurag

Hi Prashant,
When I am trying to fire the Suspend plug from my view on click of a button, I am getting the following error:
com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Cannot suspend embedded component via outbound plug <Plug Name> of view <Interface View Name>
    at com.sap.tc.webdynpro.progmodel.view.ViewManager.fireSuspendPlug(ViewManager.java:209)
    at com.sap.tc.webdynpro.progmodel.view.View.navigate(View.java:533)
    at com.sap.tc.webdynpro.progmodel.view.View.navigate(View.java:462) 
Earlier, when I used to fire the plug from my DC; it used to work fine but now my DC is being used as a used DC in another component and since then I am facing this issue.
Currently, my DC is being used as used DC. I am not sure if I use any used DC, it would work or not.
Please respond if anybody has any suggestions.
Regards,
Anurag

Similar Messages

  • 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.

  • 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 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

  • How to call another view controller's method from a view controller?

    Hi,
    Iam new to webdynpro . so pls clarify my doubt.
    How to call another view controller's method from a view controller in the same Web Dynpro Component?
    Thanks,
    Krishna

    Hi,
         The methods in a view are only accessible inside same view. you cannot call it outside the view or
         in any other view although its in same component.
         If you want to have a method in both views, then create the method in component controller and
         from there you can access the method any where in whole component.

  • When I try to send e-mail I get an error message stating that the e-mail address was rejected by the server.  When I send to e-mail from another address, I get back an error saying the e-mail address is unknown.  My e-mail has worked fine for years until

    When I try to send e-mail I get an error message stating that the e-mail address was rejected by the server.  When I send to e-mail from another address, I get back an error saying the e-mail address is unknown.  My e-mail has worked fine for years until yesterday.  HELP!

    The specific text of the error message is very important here — I'm not sure exactly you're encountering here.
    If you're able to connect to your email server and are able send email to other email addresses and if the failures are specific to one email recipient address, then please contact the intended recipient of the failing email, and confirm their address is valid.  (This is the way I'm reading your question.)
    If you are unable to send any email to any other email addresses and this is specific to your email address, then try the web mail client interface (if one is available) to verify your login user and password, and check with your email ISP for assistance.  If your email password works via web mail, follow this Apple troubleshooting guide, then — if everything else fails — I'd probably then entirely remove the email account from Mail.app and re-add it per your email ISP's particular setup requirements.  (Some issue with the setup or maybe a corrupt setting in OS X or a problem at the mail ISP servers is a common problem, but this effects attempts to send to all email addresses via that account.)
    An email account setup is specific to an email provider, unfortunately.   If you're using one of the more common email ISPs, then there are usually setup guides and frequently-asked questions posted online.

  • Can i pre order and purchase an iPhone 6 from the canada apple store online and have the phone shipped to ontario using a master card from another country?

    can i pre order and purchase an iPhone 6 from the canada apple store online and have the phone shipped to ontario using a master card from another country?

    No

  • HT201302 Hi People! please help...I want to know how can i get photos from ipad to the computer, that were synchronized previously to ipad but from another pc that i dont have access anymore and these pics are now only found in this ipad and no other plac

    Hi People!
    Please help...I want to know how can i get photos from ipad to the computer, that were synchronized previously to ipad but from another pc that i dont have access anymore and these pics are now only found in this ipad and no other place.

    Hi Alan,
    Thanks for the help, but i've actually done that before.
    It does not help, because it only shows the photos on the camera roll and do not show the photos synchronized with that pc that i dont have access anymore.
    The photos/albums all appear on the ipad, i can see it without problems but i cant get them out of the ipad to save onto pc for backup.
    And i reaaly need it, as it is the only place that i actually have these photos now...

  • How to call view of one application from another application in SAP UI5?

    Hi,
    I have a main shell application. inside the shell i have called a application project using iframe.
    Now from this project i have to access the view from the shell application. I tried getParent() but it returns null.
    How do i access view which is not in my project and in a different project?

    Yeah view cannot be called independently.
    Here in the above post i am just saying call the interface view.
    which will call the window and first view will be called.
    in the wddoinit of the first view . we will check the interface node and if a particular attribute is set.
    that means call is coming from the comp B then you can fire the plug to next view.
    this will take the user directly to second view.
    but the flow logic then will be as per by comp A only.
    means after view 2 it will go to view 3 like that as you have defined in comp A.
    so you cannot use it as an independent reusable entity.
    thanks
    sarbjeet singh

  • How I can call controller's functions from another component?

    Hi again!
    I make a few web Dynpro components, for example first for user-data processing, second - for project-data processing. In the controller of 1-st controller there is a function getUserById(). In the controller of 2-nd component I need such function. And I don't want to make a dublicate for this function in the controller of 2-nd component. Is there a way to call function in one component from another?

    Hi,
         Yes, you can reuse the component. There are two basic types of component communication. 1. Intra Component communication 2.Inter Component communication.
    1. Intra Component  communication: The two components must be in same DC(project).
    Procedure:Say there are C1,C2 components in a DC.
    Open C2, Open interface controller, create a similar (_parameters and return type_) method to the method C2. Call C2's method in this Interface method.   
    Open C1, select and right click  Used Web Dynpro Components -> Add Used Component. In the wizard, you can browse and select the C2 component,and enter a name to the usage. Then the usage of the interface <b>must </b>be added in properties required controllers of a view/component controller.
    Now we can use the method that is available in the C1 interface controller.     
    You must define method before declaring usage
    <b>2.Inter Component  communication:</b> The two components are in different DCs
    Open DC metadata of C2. Right click on Public part-> create new Public Part.Enter name-> Next -> Select entity type as Web Dynpro Component in wizard,in Select Entities  select the component ,Finish.
    A structure for public part is created.
    Open C1, Open DC metadata of C1. Right click on Used Dcs-> AddUsed DC. Browse to C2's public part.
    Select Finish.
    regards,
    Siva
    Edited by: Siva Rama Krushna on Dec 19, 2007 10:07 AM

  • Error while navigating to a View in one Application from another Applicatn

    My Application has a set of views and in one view lets say View A  there is a link while clicking on the link it triggers a outbound plug and a new view gets opened.There is another application which calls the View A of my application (when a navigation link tab is clicked) not by embedding my view instead calls the url of my application.Here when i try to click on the link from View A  i get an error stating "Cannot navigate via outbound plug navigation link missing."

    Hi,
    I suppose you have not created the navigational link.
    If not then right-click on your outbound plug and click on Create Navigation link to the new view from your viewA.
    thanks & regards,
    Manoj

  • HT4623 What happens if the download is interrupted by leaving the WIFI area? Can you continue to doiwnload from another location?

    What happens if the IOS& download is inturrupted? Can you continue from a different location?

    no Apple employees watching this?...

  • How can I reset the value of an indicator in a while loop, from another synchronous while loop?

    I am running 2 synchronous while loops, one which is keep track of time, and the other is measuring periods. In the while loop that is measuring periods, I have a boolean indicator displaying whether the signal is on or off. My problem is that when the signal is off, the VI I use to measure the periods is waiting for the next signal, and displays the boolean value from the previous period measurement. While this VI is waiting, I want the indicator to display false and not the value from the last iteration of the loop.
    I am using LV 5.1 for MAC.

    Two things you can try:
    In preface to the first, the most common (perhaps ONLY) use of local variables should be in transferring data between parallel loops. This is a matter of discipline, and creates programs that are easier to understand, take less time and memory, and are just plain cleaner. Having said that, to transfer data between loops, use a local variable.
    Second solution: Instead of setting the value to false, just hide the indicator in question by using control references (property nodes for prev. version of LabVIEW). Control references are a great way to control items on a dialog or HMI screen.

  • How can I change the format of text pasted into a Mail email from another document?

    I paste some text from a word document into an email in Mail.  In the word document, the text was indented .5" from the right margin.  In the Mail email document, the text also appears indented .5" from the right margin.
    But since this was the last text in the email I am composing, my text following the pasted-in part continues at the indented "style" of the pasted in text.  And thre are no controls for changing this indentation on subsequent text in that email, nor can you chage the indentation formatting of the text pasted in.
    Even when you select "decrease indentation" under the format/indentation options in the menu bar, Mail will not reduce a "pasted-in" paragraph indentation nor will it return a subsequent text paragraph you type in manually back to a left-adjusted margin.
    Am I miising something?
    Is there a way to see something in each Mail message composition window akin to what you see in a word processing document that allows you to set margins and indentations and tabs for individual paragraphs?  Just like the Formatting controls you have here in the Apple Support communities when you ar composing a message and that I used to indent this paragraph?
    And then used to return this paragraph back to the original left adjusted formatting?
    Steve

    Thanks for the reminder.  I use the formatting toolbar but forgot to go there instead of the Format menubar item for Mail to try the indent and outdent commands.
    But, alas, that indent, outdent option has no impact on text pasted into the message.  It remains stuck at the indent level of the source text.
    Might the answer lie in switching to plain text and formatting there?  Tried that and no difference.
    I did discover that if you highlight text pasted in with its "own" indentation preference "baked in" you can indent that text further and even "outdent" it back to where it was, but you cannot shake it's original indentation status to get it back to full left margins.
    Steve

  • HT4527 I want to start a new iTunes acct and then transfer music and apps from my iPhone into it. The music and apps on my phone were purchased from another iTunes acct, will this work?

    I'm getting divorced and need to start a new iTunes Acct. Can I start a new acct and then transfer existing music and apps into it even if they were purchsed in a different acct?

    No.
    Put it in the divorce settlement over who gets the account/purchases.

Maybe you are looking for

  • HP LaserJet P1606dn IP Configuration Issue

    I have an HP LaserJet P1606dn, brand new and fresh out of the box. I have already set it up to print via USB from a test laptop, and now  I am trying to configure it for network printing. My challenge is that the default IP address (according to the

  • Macbook Pro 2.2 Core 2 Duo Snow Leopard to Maverick

    Recent install of Mavericks including a deleting of a User from Accounts . It has been one day eight hours and "System Preferences is busy and can't be closed" "Users & Groups preferences is removing a user account and Home directory" Is this accepta

  • Bitmap Fill is not working as thought

    I am working on a simple target game. I have a class created that inherits from Sprite called TargetSprite. TargetSprite creates a resize matrix, sets beginBitmapFill, sets the line type, then draws a circle, then ends the fill. The problem is that i

  • Set a Locator location as entry point for SAX parser

    hi, 1) i want to parse a document from a specific entry location (eg line), to a defined sopt-location or stop-tag - how can i do so? 2) i just want to parse the nodes directly under the root element (some kind of depth = 1) thx for your help! JNoob

  • OSB or ALSB direct call to DB

    How can we establish direct connection from ALSB/ OSB layer to database, without using any service class/ orchestration layer? It should use TCP/IP. Pls suggest for both old version (9.x - ALSB) and latest version (OSB) thanks in adv. -V