cancel
Showing results for 
Search instead for 
Did you mean: 

opening a new window

PradeepBondla
Active Contributor
0 Kudos

Hi friends,

I have one view in my application, this view contains a table and a print button. Up on clicking the "print" button... a new window should pop up and that window should contain the same data in the original view, and new popup window should have FILE(save, saveAs, print, printpreview) tab, I mean to say it should have a built in tool bar.

I dont want to open the table data in a pdf and then print. I need, after clicking the button in the view it should open a window which should have default print option in it and also the original view's data.

Help me out.

solution will be surely rewarded

Pradeep

Accepted Solutions (1)

Accepted Solutions (1)

former_member182416
Active Contributor
0 Kudos

Hi There !

1.Just Create Another View with the Built In Toolbar and a Table View.

2.Store the Table Data in Context. so that the table Component in both the Views will get the same data.

4.Create a Variable of Binary Type which will hold the PopUP Window reference.

3.On Click of Button in First View Open the PopUp window which will Hold the

Second View.

if you need further Explaination do write back !

Cheers !

Regards

Rajendra

PradeepBondla
Active Contributor
0 Kudos

Hi rajendra,

It seems ok for me, but from main view to print view it should not navigate... from main view upon clicking the print button the second view should popup.

Explain steps 3 and 4 if possible with sample code

Former Member
0 Kudos

Hi,

The tutorial below explains how to get data in a table in poup window.(particularly the address window)

<a href="http://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">PopUp Window</a>

Once you can get the table in the pop up go through the tutorial and see

how you can use the pop up menus for your scenario.

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/061f0ca3-0c01-0010-67a6-ecc32193442f">PopUp Menus</a>

What I think is you can directly use popUp menus for your functionality.But if your requirment states that

you need to use a popup window then you can use the above sample tutorial to see how you can get a popUp window.

PradeepBondla
Active Contributor
0 Kudos

Hi shriram,

the link "popup window" is not working. please send me the url again

Former Member
0 Kudos

Hi,

here it is

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/061f0ca3-0c01-0010-67a6-ecc...

In your last reply you stated that you will be using print functinality of the New browser window.But then you cannot open the view of a same webdynpro component in the extenal browser window.

Check out the link on how you can use the printing API from java to invoke print dialog

http://java.sun.com/docs/books/tutorial/2d/printing/index.html

http://www.developerdotstar.com/community/node/124

Former Member
0 Kudos

Shririam,

Java Print API will not be available in a browser (handling a mix of Html and JavaScript) without any JVM running on the client, right?

So the corresponding links are simply useless, sorry...

Regards

Stefan

PradeepBondla
Active Contributor
0 Kudos

Hi all,

I am getting a pop up window, but it has no close, minimize and maximize icons. And the main thing is, I want the default menu options (like FILE) which intern have the print option. Is it possible to use the default menu ( browser options) in pop up window?

If now what I need to do? please help me

Answers (3)

Answers (3)

PradeepBondla
Active Contributor
0 Kudos

Requirement has been changed.

former_member182416
Active Contributor
0 Kudos

Hi There !

1.Just Create Another View with the Built In Toolbar and a Table View.

2.Store the Table Data in Context. so that the table Component in both the Views will get the same data.

4.Create a Variable of Binary Type which will hold the PopUP Window reference.

3.On Click of Button in First View Open the PopUp window which will Hold the

Second View.

if you need further Explaination do write back !

Cheers !

Regards

Rajendra

PradeepBondla
Active Contributor
0 Kudos

Hi Rajendra,

There is no standard menu exist in WD.

I created another view, embeded in another window. On click of first view print button I am calling the window. Till now its ok.

But when I add the menu bar to that view, its totally blank. How could I get standard menu bar which will have inbuild functionality,?

Former Member
0 Kudos

Hi Pradeep,

I have a clarification. Why you need two steps to print a information on the first view. See, When you first click 'Print' in first view, it shall directly print know? Why are you going to a (second) window and then want the user to click 'print' button again?

Prabhakar.

PradeepBondla
Active Contributor
0 Kudos

Hi prabhakar,

Actually on clicking the print button in the fist view, a window should popup only with table, it should not have any buttons which first view have. and user can select print option from the default menu bar in the popup window.

If I can achieve this int he first window print button only, then its ok for me. but the "print" button fuctionality should be like this.... It should only print the table data, it should not print the button in the printed page (not even "print" button also).

plz guide me.,....

Former Member
0 Kudos

Hi Pradeep,

Check out this

Prabhakar.

PradeepBondla
Active Contributor
0 Kudos

Hi prabhakar,

that thread speaks about printing using Export to Excel funtionality. but i wanted to do as you and rajendra suggested. I will show the table content in new view and will use the browser functionality of the new view.

just let me know how to call the browser funtioned window from button.

Former Member