cancel
Showing results for 
Search instead for 
Did you mean: 

Navigation from child component to parent

Former Member
0 Kudos

I tried the said solution in this thread and I got the following exception.

com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Cannot navigate from view <EmbededComponentInterfaceView> because it is not part of the current view assembly
 at com.sap.tc.webdynpro.progmodel.view.View.navigate(View.java:538)
    at com.sap.tc.webdynpro.progmodel.view.View.navigate(View.java:462)
    at siemens.com.sm3k.shiftmgt.wnd.wdp.InternalShtEvtEvaWndInterfaceView.wdFirePlugGotoShtEvtDetail(InternalShtEvtEvaWndInterfaceView.java:144)
    at siemens.com.sm3k.shiftmgt.view.ShtEvtEvaView.onActionshowShtEvtDetail(ShtEvtEvaView.java:253)
    at siemens.com.sm3k.shiftmgt.view.wdp.InternalShtEvtEvaView.wdInvokeEventHandler(InternalShtEvtEvaView.java:391)

This happens when i fire the outbound plug using the following code.

wdThis.wdget<view nameWindowInterfaceView>().wdFirePlugOut();

_________________________________________________________________

Solution was as under:

Hi

Go to Interface view of your 2nd component and create an OutPlug there. you can see a default inbound plug there due to which you are able to navigate to 2nd view.

After creating out plug build your component to make the changes take affect.

Now create a button on click of which you will navigate to 1st view.

But you will not get this plug in you view controller of 2nd component as default. to get it, put interface view controller as required controllers under Properties tab of your 2nd view.

Now onAction of button put this code

wdThis.wdget<view nameWindowInterfaceView>().wdFirePlugOut();

Now build and deploy 2nd component.

You can get out plug in second view in navigation modeler of 1st component.

create an inbound plug in 1st view and make a navigation link.

you will be able to navigate back

Mandeep Virk

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member201361
Active Contributor
0 Kudos

Hi Faraz,

Please follow the below Steps:

U have two development Components say Dc1 and Dc2 .

u have navigate from Dc1 to dc2 vice versa.

Dc1 Component :

In the view , create a button say GO.

open the window , create a Outbound Plug for the view (Right Click on the view -->Create OutBound Plug).

Go to the View Controller Class, in the OnActionGo Event Handler fire the outbound plug .

Dc2 Component :

In the View Create a button Say Back .

In the Interface View , Create a OutBound plug say "ToFirstComponentDc1" with the same name create the outbound plug in the window Editor Controller (Type is Standard).

In the View Editor add the window Controller as the require Controller .

create a event handler say "Back" in the window Controller .

In the View Java Editor , call the window controller back event handler .

Add the dc2 to the Public Part(Right Click on the dc1 -->Add topublic Part).

Go to Development Infrastructure :

Select the Dc1 --> go the Component Properties , add the Dc2 to the dc1 .

Finally right Click on the Dc1-->Syn/Create project -->Sync dcs .

Sync Dcs Should be Done to both the Dcs

In the Dc1-->Used Components -->Right Click >Add Dcs>Select the dc2 and life cycle be CreateOndemand.

Open The window editor of Dc1 :

Embed the Interface View of dc2

and Create Data Link between the Oubound Plug nad Inbound Plug between dc1 ad dc2.

Finally deploy the dc2 first and dc2 1

if u have doubt let me know

thanks and regards

Former Member
0 Kudos

Guys thanks for your response but I want to navigate from the child component to the parent component NOT from parent to child component. And when I say component I DON'T mean development component, I mean the Web Dynpro Components. I am not using CE. I am currently using 7.0 sp11.

This thread seems to have solved other people's problem but I am getting this exception.

Former Member
0 Kudos

Hi

check out this doc:[https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f07c3625-c971-2910-3a9c-ce131487f82c]

Regards,

Khushboo

Former Member
0 Kudos

Went through the doc but it doesn't discuss my specific problem.

Anyone?

Former Member
0 Kudos

So I have an outbound plug in my Interface view of the child component. I call this outbound plug from the the view of the child component. This interface view of the child component has a navigation link to the view of the parent component in the navigation modeler or parent component. Is there anything else I am missing?

Edited by: Faraz S on Sep 4, 2008 8:15 PM

Former Member
0 Kudos

Created a fresh web dynpro project and tried the same solution as in my question and it works. But doesn't work in my original huge project. Have to find out whats wrong. Hopefully something small (fingers crossed).

Former Member
0 Kudos

It seems that the interface view of my child component or the whole child component in my huge project is

somehow corrupt. I created a new view in the child component and tried to navigate from it and I get the following

error. Anybody know how to clean the component/project? I have tried the options "repair project source, create

archive, rebuild, restore" to no avail.

com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Instance of interface view controller DummyWndInterfaceView does not exist. 

    at com.sap.tc.webdynpro.progmodel.controller.Component.getController(Component.java:373)
    at com.sap.tc.webdynpro.progmodel.generation.DelegatingComponent.getPublicInterface(DelegatingComponent.java:181)
    at siemens.com.sm3k.shiftmgt.comp.wdp.InternalDummyview.wdGetDummyWndInterfaceViewController(InternalDummyview.java:164)
    at siemens.com.sm3k.shiftmgt.comp.Dummyview.onActiongoback(Dummyview.java:143)
    at siemens.com.sm3k.shiftmgt.comp.wdp.InternalDummyview.wdInvokeEventHandler(InternalDummyview.java:140)
    ... 45 more

Former Member
0 Kudos

Hi

Seems that a component containing DummyWndInterfaceView is not active.

So try to build and deploy same component. As your main component which is using it, is unable to get this view.

First build and deploy all components being used one by one and then deploy main component.

Mandeep Virk

Former Member
0 Kudos

I only have 1 web dynpro DC and within that DC I have several

web dynpro components. DummyWndInterfaceView is part of one

child component. So I don't find any explanation for this.

Former Member
0 Kudos

See this thread for solution.

sureshmandalapu6
Active Contributor
0 Kudos

Hi

1.First place the method you want to expose in DC1 interface controller.

2. Expose the interface controller as public part in DC1.

3. Add the public part of Dc1 to Dc2.

4. Now add the InterfaceComponentController of DC1 in DC2 .

5. Now you should be able to access to methods in Dc1 interface controller.

6.to access outbound plug just writ

wdThis.wdget<interfacecontollername>().wdFireplug<outplugname>();

I am new to webdynpro java up to my knowledge i answered the question if it useful give me points

The DC is a software entity that is reusable any where.For Re usability purpose DCs will be created in your project. Suppose if we create a webdynpro DC say DCA and there are two webdynpro components say DCA_Comp1 and DCA_Comp2. I have a one more DC say DCB. This DCB wants the functionality of DCA_Comp1..

Then add DCA_Comp1 to the public part of DCA.

Add DCA in DCB. Explore DCDefinition->Used DCs-->(Right click)--->Select Add DC

In DCB component declare a comp and used components.

Now in DCB you can use the functionality of DCA_Comp1 but you can not use DCA_Comp2 because its not added to public part

http://wendtstud1.hpi.uni-potsdam.de/sysmod-seminar/SS2005/presentations/19-NWDI-Overview.ppt

thanks

Suresh

former_member201361
Active Contributor
0 Kudos

Hi Faraz,

Navigation between two components is possible and have u embeded the view in the window ?

have a look to this link :

[https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/8881] [original link is broken] [original link is broken] [original link is broken];

please specify ur requirements more clearly .

Thanks and Regards