cancel
Showing results for 
Search instead for 
Did you mean: 

Doubt about webDynpro windows

Former Member
0 Kudos

HI Experts,

I have small doubt about webdynpro windows.

1) If i have only one application in webdynpro DC , what is use of using multiple windows.

2) If i have multiple windows in a DC which has single application, how i can i navigate between windows?

3)if i have multiple applications with multiple windows, then how will i know which window belongs to which application.

4)If i have multiple windows and multiple applications, then how can we navigate between windows? It means navigation betn windows and navigation betn applications...?

Please explain me, i browsed in SDN, i found the threads but they are explaining my doubts exactly

Thanks in advance.

Regards,

Bala

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi.

Simply the Window is part of Web Dynpros public interfaces, and are needed whenever you want to access a graphic component from outside of your web dynpro component.

Web Dynpro uses the MVC design pattern. Model View Control.

In order to reuse components, Web Dynpro exposes the View and Controller to the outside world.

Internally the View and Control in MVC is just that:

Views

Component Controller and Custom Controller.

Externally the View and Control are exposed as

Interface Controller and Interface Views. The Interface View is the external part of a Window. (When a Window is created, an associated Interface View is created).

So, to be able to actually see anything from a Web Dynpro application. The browser would access a Interface View that opens the Window with some view in it.

An other example is that you have two Web Dynpro projects, where the first one have a View with an integrated view from the second Web Dynpro. The integration would be through the Interface View again.

Internally in your Web Dynpro component, you can use the views directly (i.e. navigate between views).

Opening an external popup would generate a new browser window. In order for the new browser window to display anything it would need to access an interface view. That's why you need to create a separate Window when you want to use a popup.

Regards.

Edited by: Mikael Löwgren on Feb 15, 2008 12:58 PM

Former Member
0 Kudos

Hi Bala...

As per u r question numbers answers are below...

1. it will be use full,,when ur clicking some button or some action u will show another window.like gmail if ur click upload file it will be open one window or dialog box

2.yes, by using window name ...using model window concept

3.u can knw this by seeing u r application window Interfaceview-Which windows is selected..

4. The last one, U can navigate by using the name of the window...For example..

suppose u r having two app and two windows..if u click a button ,u want to go another window means..by using the name of the window u can achieve this...

IWDWindowInfo windowInfo = (IWDWindowInfo)wdComponentAPI.getComponentInfo().findInWindows("Addressbookwindow");

IWDWindow window=wdComponentAPI.getWindowManager().createModalWindow(windowInfo);

//window.setWindowPosition(300,150);

window.show();

wdContext.currentPopupElement().setWindowinstance(window);

Hop it helps u..

GS

Former Member
0 Kudos

Hi GS,

the last two lines code is not working for me.

window.show();

wdContext.currentPopupElement().setWindowinstance(window);

show() method is undefined.

what is this currentPopupElement()...?

In window1 i have one button, by clicking on that it should navigate to window2 and the show the view which is there in window2, this is my requirement.

on the button action i wrote your code.

And findInWindows("i gave window2");

nothing was happening, can you please explain clearly.

Regards,

Bala

Former Member
0 Kudos

Hi Bala..

wdContext.currentPopupElement().setWindowinstance(window);

We have created this one for getting windows instance. In future if u want to clos the opened window, u can use this instance and clos u r existing window. Actually this no need...

And for tht findInWindows("Addressbookwindow"),

U have to give the exact name of the window which u want to open.

Hop it helps u.

GS

Former Member
0 Kudos

Hi Sathish,

In my DC i have only one Application but two windows.

Each window has one View.

Now on action i want show the view which is there on window2.

I wrote the below code in the action.., but it gives me java.lang.StackOverflowError Error

Any other things need to be done apart from this......???

My Code....

public void onActionGo(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )

{

//@@begin onActionGo(ServerEvent)

wdComponentAPI.getMessageManager().reportSuccess("1....");

IWDWindowInfo windowInfo = (IWDWindowInfo)wdComponentAPI.getComponentInfo().findInWindows("Window2");

IWDWindow window=wdComponentAPI.getWindowManager().createModalWindow(windowInfo);

window.setWindowPosition(300,150);

window.open();

//wdContext.currentPopupElement().setWindowinstance(window);

//@@end

}

Regards,

Bala

Former Member
0 Kudos

I doubt that the stack overflow is caused by this code. Do you have a stacktrace?

Armin