cancel
Showing results for 
Search instead for 
Did you mean: 

How can I get the current window instance?

Former Member
0 Kudos

Hi everybody,

I want to edit my CURRENT window but I don't know how to get the instance of it.

My task is to remove the status, menu and tool bar from the browser.

I found the code

IWDWindow window1 = wdComponentAPI.getWindowManager()createExternalWindow("http://www.google.com", "MyURL", true);

window1.removeWindowFeature(WDWindowFeatur.STATUS_BAR);

But this won't help because it edits a new external window and I want to edit the current window (first window to open).

Can somebody help me?

THX a lot.

Dirk

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Using the following,

IWDWindowInfo windowInfo =

wdComponentAPI.getComponentInfo().findInWindows("Ur Window");

and please have a look at this thread

Regards,

Saravanan K

Former Member
0 Kudos

Thanks a lot, but it doesn't work.

In the method wdDoInit() I try it like this:

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

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

window.remmoveWindowFeature(WDWindowFeature.ADDRESS_BAR);

But the address bar appears .....

If I use this code with the method createExternalWindow it works. But not with the window I start the application.

Answers (2)

Answers (2)

siarhei_pisarenka3
Active Contributor
0 Kudos

- If you create the window instance somewhere in the parent WD component and if you get IWDWindow instance then you can control the window behavior in the parent component.

- If you use the WD component in Portal maybe you can configure portal iView/Page to hide the address bar and other browser features.

BR, Siarhei

Former Member
0 Kudos

=> Solved

My boss said "Keep it simple as it is!"

Every user on our network became a new Desktop Symbol on their workstation that starts the internet explorer like this:

iexplore -k http://<portal-page>;

THX at all.

former_member184154
Active Contributor
0 Kudos

Actually as far as I remember you can't manipulate anyhow the main browser window, due to the browser security istelf (i.e. it doesn't have anything to do with WebDynpro). You can only remove address bar, status bar etc. when in child windows.

For what it's worth, your (and your boss') solution is just perfect.

Cheers,

Alex

former_member184154
Active Contributor
0 Kudos

Double post, sorry.

siarhei_pisarenka3
Active Contributor
0 Kudos

Hi Dirk

I think that it's not possible to implement what you want from the current WD component.

With method findInWindows(...) you can get only a metadata of the current window (IWDWindowInfo). But you need a window instance, not metadata.

With IWDWindowManager you can create new window instances, but it cannot help you to get the current window instance.

Maybe in new NW 7.11 WebDynpro API the problem is resolved somehow.

BR, Siarhei