cancel
Showing results for 
Search instead for 
Did you mean: 

Title Bar Text

SandipAgarwalla
Active Contributor
0 Kudos

Hi All,

Is there any way to change the title bar text of a window at run time

Regards

sandip

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos
        • WARNING : NOT STANDARD WEB DYNPRO API ****

But the answer is yes. You have to use the window class, which is the implementation of WDWindow. But there is not supposed to be support for this.


import com.sap.tc.webdynpro.clientserver.window.Window;

IWDWindowInfo windowInfo = wdComponentAPI.getComponentInfo().findInWindows("MyWindow");
IWDWindow newWin = wdThis.wdGetAPI().getComponent().getWindowManager().createWindow(windowInfo, true);
((Window)newWin).setTitle( "Look ma, titles" );
newWin.open();

Answers (2)

Answers (2)

0 Kudos

> Hi All,

> Is there any way to change the title bar text of a

> window at run time

>

> Regards

> sandip

Hi!

There is a way to do this. Creat in the context a attribute of type string. In the property of the text element enter as text the context element. Now when ever you change the context attribute the text will be changed,too.

Happy programming

Markus

0 Kudos

Sorry ... works only within view (for groups and so on) but not in windowos.

Bye Markus

Former Member
0 Kudos

Hi Sandip,

This is impossible using standard WD API.

You can only "statically" assign title using Window Designer (for newly opened window) or set meaningfull name to Application (this name used as title of top-level window)

VS

Former Member
0 Kudos

Hi Sandip,

I also agree with VS, we can do dynamic programming only in wdDoModifyView in the view controller implementation. And there we dont get any handle for the window object. So if you know the Window title at the design time you can secify that in the "Title" property of the window object. Thats all we can do till now with the Window object. No way to do any dynamic property setting.

regards,

Shubhadip