cancel
Showing results for 
Search instead for 
Did you mean: 

Setting window titles through API

Former Member
0 Kudos

Right now, the IWDWindow API does not provide a way of setting window titles.

I can solve this problem right now by casting the IWDWindow object into a Window object and calling setTitle on it.

( (Window) newWin ).setTitle( "My Title");

Why is setTitle() not a part of the IWDWindow API?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Tomas!

I'm working opening popups windows with the APIs

- com.sap.tc.webdynpro.services.session.api.IWDWindow

- com.sap.tc.webdynpro.clientserver.window.Window

as follows.

IWDWindow window =

wdComponentAPI.getWindowManager().createModalWindow(

wdComponentAPI.getComponentInfo().findInWindows

("GraficasWindow"));

((Window)window).setTitle("My title");

window.open();

and it works.

Hope that help u.

best rgds

Gregory.

Former Member
0 Kudos

Hi Tomas,

the window title is retrieved from the title you can enter at the corresponding property when editing a window (visible in the properties view).

I guess, it's not part of the API, since then you have to take care of I18N by yourself, instead the title property is automatically added to the translatable property files.

Hope that helps.

Regards

Stefan

Former Member
0 Kudos

Thanks for your reply Stefan.

I am aware that the window name is set in the windows properties. But it does not seen to allow you to either assign a variable from the context or change this title dynamically using the message pool.

Is there a way to do this with the current API? Can you change the title of a window programmatically with the IWD* libraries?

Former Member
0 Kudos

Hi Tomas,

no, i'm afraid, there isn't a possibility to do this programmatically now without the cast you already use.

Regards

Stefan