cancel
Showing results for 
Search instead for 
Did you mean: 

0px width external window

Former Member
0 Kudos

Hi,

I try to create an external window that is actually hidden (only for printing options).

I used the following code but this is not working?

IWDWindow win = wdComponentAPI.getWindowManager().createExternalWindow(resource.getAbsoluteURL(), "Print order information", false);

win.setWindowSize(WDCssSize.ZERO_PX, WDCssSize.ZERO_PX);

win.open();

There is no hide option on the IWDWindow either and I also tried several thing in the opened HTML window with javascript hide.

Does anyone know how I can do this.

- Or from the Web Dynpro IWDWindow object?

- Or maybe directly from javascript?

Thnx in advance!

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

hi

You want the new window only for <b>printing</b> then why cant you use <u>PRINTBUTTON UI ELEMENT</u>

if you want to know much about windows look into this

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/wd%20java/wd%20tutorials/dialog%20boxes%20in%20web%20dynpro%20applications.pdf">Tutorial</a>

Regards

Chaitanya.A

Former Member
0 Kudos

Hi,

IWDWindow win = wdComponentAPI.getWindowManager().createExternalWindow("http://www.google.com","Google",false);

win.open();

win.hide();

Try this....

Regards,

Murtuza

Former Member
0 Kudos

Hi,

I'm using Netweaver developer studio 2004 SP18.

In this release the object IWDWindow doesn't have a hide() method.

Former Member
0 Kudos

Hi,

If your requirement is such that you don't need to have user interaction on that window at all then you can immediately close that window after opening.

IWDWindow win = wdComponentAPI.getWindowManager().createExternalWindow("http://www.google.com","Google",false);

win.open();

win.close();

Regards,

Murtuza

Former Member
0 Kudos

Chaitanya, Unfortunally I can't use the Print UI element since this element is not in this release.

And if it was in this release I still couldn't use this option because it's only printing the complete view right? E.g. if you have 20 elements in your table and the property of your rowsize is set on 5, then you will see only 5 elements on your printing page right?

Murtuza, I allready use the close option in my HTML page

(<body onLoad="window.print();window.close()">)

If I use the option "win.close()", the Web Dynpro framework closes the window even when the page is not finished loading.

With the option in the javascript: print() you still see the page, above the popup with your printing screen. After pressing the cancel or the print button the window closes.

Now I want to achieve the same, only with a hidden window.

Former Member
0 Kudos

Hi,

you can use an IFrame for this and set your HTML page to the source property of your IFrame UI element. You can handle the visibility of the IFrame.

Regards,

Murtuza

Former Member
0 Kudos

Hi Murtuza,

That's an other option I allready tried.

Since I'm using "window.print()" in my HTML content, only the window is printed out. So you won't see any content from the IFrame then.

The "document.print()" is not valid anymore in JavaScript.

Does anyone have an other solution? Maybe something like:

<body onLoad=window.height=0>