cancel
Showing results for 
Search instead for 
Did you mean: 

choose startup plug

Former Member
0 Kudos

Hi all,

in my WD application controller I'm executing some code in wddoInit method and, depending from the result of this code, I'd like to plug one view or another.

I try to use the wddoBeforeNavigation to fire an event, catch it in the default view and then fire plug to the second one but I have the following error:

com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Cannot navigate from view DefaultView because it is not part of the current view assembly

how can I solve this?

thanks in advance,

Stefano

View Entire Topic
Former Member
0 Kudos

Hi Steffano,

What I understand is that you wish to navigate from one view to another if some condition is met for which you have written code in wdDoInit() method.

When you create a component, a window is created with the default startup plug & default view.

I hope you have already created the second view (say V2) for this same window.

Now, you need to create the outbound plug (say ToV2) for the default view, inbound plug for the 2nd view & the navigation link from outbound plug to inbound plug (this you can do in the Navigation Modeler which can be opened thru double click on the window in Web Dynpro Explorer).

Code to be written in view controller

// If your condition is met, then below code is called, which fires outbound plug to take you to 2nd view

if(condition) is true

{

wdThis.wdFirePlug<ToV2>();

}

Hope this solves your query.

Kind Regards,

Nitin

Edited by: Nitin Jain on Feb 15, 2009 9:58 AM