cancel
Showing results for 
Search instead for 
Did you mean: 

Navigation from One Window to other Window in same Component

Former Member
0 Kudos

Hello,

Component: MAIN

2 iviews - AView & BView

2 windows: FirstWindow & SecondWindow.

2 WindowInterfaceViews: FirstWindowInterfaceView & SecondWindowInterfaceView

FirstWindow contains: AView & interfaceView of BView (plug from AView to BInterfaceView)

SecondWindow contains: BView (default) & AView. (there are plugs to navigate between two views. i.e. from AView to BView & viceversa).

for both the windows I should navigate from different scenario. i.e. FirstWindow from XComponent through FirstInterfaceWindow& SecondWindow from YComponenet through SecondWindowInterfaceView.

2 scenarios: please read 2 scenarios carefully

1) if I navigate to FirstWindow from XComponent i.e currently i am in AView then I could navigate to BView from AView (Upto here the navigation is working successfully) there is a button in BView which plugs out to another component (OTHER_Component), when i click that i am getting the below error

"Cannot navigate via outbound plug ToOther of view BInterfaceView because there is no navigational link attached to it".

2) whereas if navigate to secondWindow from YComponent, then i cloud navigate to the AView & plug out to OTHER_Component successfully. i.e. ToOther plug is working fine & could navigate to Other_component

"i.e. problem is only when entering from FirstWindow then navigating to BInterfaceView then i couldn't navigate to the OTHER_component..

Thanks & Regards

Maha

Accepted Solutions (0)

Answers (1)

Answers (1)

siarhei_pisarenka3
Active Contributor
0 Kudos

Hi Maha

The problem is BView contains output plug ToOther and BInterfaceView does so, but there is no navigation link from BInterfaceView to OTHER_component. Add the navigation in first window from BInterfaceView to OTHER_component.

BR, Siarhei

Edited by: Siarhei Pisarenka on Nov 17, 2009 12:13 PM

Former Member
0 Kudos

there is a link from BinterfaceView to Other_component

i want to navigate from AView to BView & then the BView should behave exactly as it is in SecondWindow.

you can say to use BView in FirstWindow instead of BinterfaceView, if i do the same.

that is if i use BView in the FirstWindow, then when navigating out to the other_component then i am getting another error.

error message: Instance of interface view controller BInterfaceView does not exist.

Either i want to navigate from FirstWindow to SecondWindow. how can i navigate from FirstWindow to SecondWindow of same component?

or How can i instantiate the interface View controller BInterfaceView?

Former Member
0 Kudos

HI Maha,

If in am not wrong there are overall three components compX, YourComp and compY.

In your component you need to have two views View1 and View2 but i different windows say Win1 and Win2 respectively.

Within YourComp you need to navigate from View1 to View2 which are in different windows by windows navigation using plugs and embedding the other's interface view. You have embedded interface view for Win2 in Win1 but not interface view of Win1 in Win2. So, embed that and mention the navigation via plugs from View2 to interface view if Window1. And, embedding View1 in Win2 along with View2 is need less.They can be done using plugs and interfaces as well.

Now the problem is your application will have just one startup plug which will decide which would be the default Window to start (in turn decided by choosing the interface view of the default window intended). As if it is interface view of Win1 then directly navigating to Win2>View2 is ruled out.

That is why it is giving error in finding the navigation link from win2 to win1.

Just double click on your application and check the default startup plug and the default interface view selected. It will help you understand better.

So, we cannot have two different starting windows for the same application (needless to say).

What you can do is let the interface view of the wind1 be the default one, s that it always starts with View1 which is the default view for the window. No in the wdDoInit() of View1 check if it coming from CompX or CompY. In case, it comes from CompY, navigate to View2 using plugs and interface views. Otherwise, not. This will cause you to land up on View2 if you come from CompY.

Now the question is how do we decide whether it is coming from CompX or CompY? You can have output parameters of same name say "param" from both the components but with value 0 and 1. Now catch this passed parameter in the wdDoInit of YourComp using WDProtocolAdaptor API and decide the source Component.

Hope, your problem is resolved.

Regards,

Tushar Sinha

Former Member
0 Kudos

Hi Maha,

You can use this for catching input parameter in the wdDoInit() hook method.

int flag = WDProtocolAdapter().getProtocolAdapter().getRequestObject().getParameter("Param");

and WDPortalNavigation API for navigation between components. You can pass output paramters as argument to this method.

Regards,

Tushar Sinha