cancel
Showing results for 
Search instead for 
Did you mean: 

populate pop up windows content

Former Member
0 Kudos

Hi All!

I have implemted below shown code. The problem I'm having

is I get an error message in the pop up window and

secondly how can I pass to the pop-up window or fill its

content with a content of existing file or any other thing

instead of this error message?

I can imagine it will be done by giving a correctly path

to createNonModalExternalWindow's first parameter. It is just

an assumption.

IWDWindow win =

wdComponentAPI.getWindowManager().createNonModalExternalWindow(

"Print.htm","Test");

win.setWindowSize(400, 400);

win.setWindowPosition(WDWindowPos.CENTER);

win.removeWindowFeature(WDWindowFeature.STATUS_BAR);

win.removeWindowFeature(WDWindowFeature.TOOL_BAR);

win.removeWindowFeature(WDWindowFeature.ADDRESS_BAR);

win.removeWindowFeature(WDWindowFeature.MENU_BAR);

win.show();

Error message

com.sap.tc.webdynpro.services.sal.deployment.api.WDDeploymentException:

Failed to get deployable object part for application 'Print.htm'

of deployable object

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Follow these steps for showinf PopUp window in NWDS:

1 Ceate a Window "PopUpWindow" in NWDS.

2 Embed New View in it.

3 Create a context in this view and Map it to the View from where this window will be called.

4 Now create an action. And in this action write following code:

Write here Code for Populatinghe data, that will be shown in PopUp window .

After that open the popup window.

IWDWindowInfo windowInfo =

(IWDWindowInfo) wdComponentAPI.getComponentInfo().findInWindows(

"PopUpWindow");

wdComponentAPI.getWindowManager().createModalWindow(windowInfo);

// set the WindowPosition on the screen

window.setWindowPosition(150, 150);

window.show();

Hope this helps.

Regards,

Amit

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi!

What is an interface view? It s new for me. Why do I need an interface view ?

Well the problem I'm having is . I have to show a content form another view

in a seperate new window (pop up ) when user

klicks on a buttton. That means clearly on clicking

opens a new browser window, and this new window contens the data content from a view..

What would you suggest ?

Regards

sas

Former Member
0 Kudos

Hi,

Their are two approaches for your problem.

1) using modal window

2) external modal window as what you are trying.

first approach is very easy to if your requirements meet it.

1)You have to create a view

2) Embed this view in a window

3) call this from code.

IWDWindowInfo windowInfo = wdComponentAPI.getComponentInfo().findInWindows("<Your Window name>");

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

window.show()

second approach

1)create a view

2)create a window, specify an interface view.

3)embed the view to this window.

4)create an application

while creating select existing component and select the interface view created in step2.

5) call this from code

URL Should point to the Application created

IWDWindow window = wdComponentAPI.getWindowManager().createNonModalExternalWindow(URL, title)

Regards

Ayyapparaj

Former Member
0 Kudos

Hello!

How can I embed a view in a pop ?

Because I dont understad how to assign a created view to pop-up-window ?

IWDWindow win =

wdComponentAPI.getWindowManager().createNonModalExternalWindow(

"Print.htm","Test");

Regards

Sas

Former Member
0 Kudos

Hi,

In the Web Dynpro Components, you can see the Windows ICon, create a Window there and then embed the created View in it.

Regards,

Amit

Former Member
0 Kudos

Hi,

If you are using the external window create an application which points to the interface view which contains the iframe.

Regards

Ayyapparaj

former_member751941
Active Contributor
0 Kudos

Hi erdem,

Check this thread,

Regards,

Mithu

Former Member
0 Kudos

Amit sorry I can't follow you.

What do you mean with .

1 Ceate a Window "PopUpWindow" in NWDS.

PopUpWindow is generated by the code :

wdComponentAPI.getWindowManager().createModalWindow(windowInfo);

// set the WindowPosition on the screen

window.setWindowPosition(150, 150);

window.show();

I want to show e.g. a picture, text.txt file or any documents content in it.

Regards

Former Member
0 Kudos

Hi,

Put an Iframe in the view of the popup and bind the source property to the url of your image, text ....

Regards

Ayyapparaj

Former Member
0 Kudos

Have you placed the HTML file in src --> MIME --> Component

in the navigator.

Regards,

Amit

Former Member
0 Kudos

Hi,

Instead of just Print.htm, try the full address:

http://servername/path/Print.htm

Good luck, Roelof