cancel
Showing results for 
Search instead for 
Did you mean: 

Window to Window Navigation

raja_narayanan2
Active Participant
0 Kudos

Hi..all

This is my scenario.. please help me...

I have one window called main window...and in that main window i have one view called VIEW1...

the view is designed ad per clients requirements and there is one view element LINK_TO_ACTION is used.

if i click that link a popup window should open and there i will give my userid and password and if i click on login... the popup window should closed and navigate to the main window VIEW2...

i completed the scenario till i get the popup window....

no if i click on login it should navigate to VIEW2 in main window....

please help me how to navigate from popup window to main window...

thanks in advance....

Regards

Raja.

Accepted Solutions (1)

Accepted Solutions (1)

uday_gubbala2
Active Contributor
0 Kudos

Hi Raja,

Am giving you an idea by which you can accomplish the same. You can't directly navigate from the popup window to a 3rd view coz the control would return back to the view from where you had called this popup. You can instead get this scenario working for you:

1) You navigate from a MAIN view to a popup view POPUP.

2) You return back to the MAIN view after succesful login in the POPUP window.

3) You now get automatically re-directed (navigated) to a 3rd view without any user intervention.

If the above said scenario holds good enough for your desired requirement then please continue reading ahead.

1) Place a TimedTrigger in your MAIN view and bind its "enabled" property to a component attribute (say timer) of type WDY_BOOLEAN with a default value of fales. (i.e, leave it as blank)

2) Define the "Delay" property of this element as "1".

3) Define a method for the "onAction" property in which you just fire an outbound plug to the 3rd view.

So this timer is by default in the disabled state. When you are navigating back from your POPUP view to your MAIN view set the value of the context attribute created earlier (timer) to true. (i.e, X) So now the system does navigate back to the MAIN view but as soon as the time mentioned in the timers "Delay" property elapses the system initiates navigation to your desired 3rd view. Hope that it helps resolve your problem.

Regards,

Uday

PS: Also please keep it in mind 1 thing. Once you navigate to your desired 3rd view reset the attribute value which you are binding to the TimedTrigger's "Enabled" property to false. Otherwise the trigger would keep triggering outbound plugs to your 3rd view. So in case you ever again navigate to your MAIN view the system would be again re-directing you to the 3rd view.

raja_narayanan2
Active Participant
0 Kudos

HI... Uday Gubbala

thanks for your reply....

i was trying the same... but still after closing my popup window i came to main window but its not trigerring the navigation.... i dont knw where i went wrong....

can you pls elaborate how to trigger the timer...

Regards

Raja

uday_gubbala2
Active Contributor
0 Kudos

Hi Raja Narayanan,

I dont think that you have completely gone through what I had suggested & [Gabriele's earlier thread|https://forums.sdn.sap.com/click.jspa?searchID=18574117&messageID=6435535]. Its simple.

Create an outbound plug from your main view to the desired 3rd view. Place a TimedTrigger in your main view & set its Delay property to 1. (i.e, it triggers the event after every 1 second) Bind the Enabled property of this TimedTrigger to an boolean context attribute with an default value of false. (i.e, blank) Define a method for the "onAction" property of your TimedTrigger & inside this just fire an outbound plug to the desired 3rd view.

So this timer is by default in the disabled state. When you are navigating back from your POPUP view to your MAIN view set the value of the context attribute created earlier (timer) to true. (i.e, X) You can do this in the action handler method you have written for the user login. So now the system navigates back to the MAIN view it is in Enabled state & as soon as the time mentioned in the "Delay" property elapses the system triggers the method mentioned in the onaction property. As how created earlier within this method you are firing your outbound plug to the 3rd view so the system does navigate from this Main view to your 3rd view. Hope that it helps resolve your problem.

Regards,

Uday

raja_narayanan2
Active Participant
0 Kudos

hi...Uday Gubbala

Thanks a lot.... i solved the issue.....

Regards

Raja

Answers (1)

Answers (1)

arjun_thakur
Active Contributor
0 Kudos

hi,

you can try this:

create a method in your component controller and in its coding part write code to fire plug from view1 to view2.

now in ur pop up window: in the ONACTION of login button, you can call that method which you just created and also write the code to destroy the pop up window.

i think it'll work

regards

arjun

uday_gubbala2
Active Contributor
0 Kudos

Hi Arjun,

That approach doesn't work coz no matter what you try the system does take you back to the view from where you are calling this popup window. So thats the only workaround thats possible for resolving this problem. You can try go through this [thread|https://forums.sdn.sap.com/click.jspa?searchID=18574117&messageID=6435535] where Gabriele was facing a similar problem & had tried various combination of logics.

Regards,

Uday

arjun_thakur
Active Contributor
0 Kudos

thanks uday!!

regards

arjun