cancel
Showing results for 
Search instead for 
Did you mean: 

Embedding a view to a windo in Java WD

Former Member
0 Kudos

Hi,

I need to create a dialog box, that pops up on a button click.

This box should contain some text, a text box for entering input, and "ok,"cancel" buttons.

1. Is there some type of predefined window that I can use?

2. In case the answer for 1 is "no", I assume I should create a new window, and embed a view to it. Can you please explain me how it is done?

Best Regards,

Oren.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

We have confirmation dialog but you can't have input field in that. If you want just some text to be displayed and Ok CANCEL button then you can use it.

For you requirement, you will have to create a new window with the view designed as per your requirement and can open that window on click of some button in the first view using:

wdComponentAPI.getWindowManager.createWindow()....

Regards,

Murtuza

Former Member
0 Kudos

Hi Murtuza,

And how do I embed this view to the window?

Thanks,

Oren.

Former Member
0 Kudos

HI,

Just create a new window

In WebDYnpro Explorer

<Project name>-->WebDynpro ><component name>>Window-->RIght Click and create window

Now right click on this newly created window and select Embedd View. You will get an option to embedd a new view.

Select new View and then design that new view as per your requirement.

Regards,

Murtuza

Former Member
0 Kudos

Hi,

I know how to embed a view to window in design time.

What I still don't understand, is how, to open this window in runtime, after I click the button. What is the API?

Thanks,

Oren.

Former Member
0 Kudos

Hi,

Below is the code for the same:

IWDWindowInfo windowInfo = wdComponentAPI.getComponentInfo().findInWnidows(<name of your window>);

// Remember the name should be exactly same keeping the case sensitivity in mind.

IWDWindow window = wdComponentAPI.getWindowManager().createWindow(windowInfo,true);

window.setWindowPosition(WDWindowPos.CENTER);

window.show();

Regards,

Murtuza

Former Member
0 Kudos

Hi Murtuza,

Thank you for a very helpful reply!

Best Regards,

Oren.

Answers (0)