cancel
Showing results for 
Search instead for 
Did you mean: 

Setting the title of the main window (application window)

Former Member
0 Kudos

I have 5 different views and these views get displayed in the application window (not at the same time). I want to change the window title based on the view that is currently being displayed. How do I do that?

If I had one view only, which gets displayed in the application window ... how do I set the title of the application window?

Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hai ,

In the Propeties of Application, chnage name value.

regards,

Answers (3)

Answers (3)

Former Member
0 Kudos

I apologize, I should have mentioned that I am working in Web Dynpro ABAP.

Deepak Appu,

I dont see the TITLE property in the window properties section.

Saravanan K,

I would love to understand how to do what you are recommending. How do I get a handle to the window object from the view controller. Some code and instructions will definitely help. Please do post the HOW-TO. Thanks in advance.

Naga Raju Meesala,

Thanks. Your suggestion helped. It dosent make my application dynamic but does help to some extent. I will reward some points for this. Thanks.

Former Member
0 Kudos

Hi,

You can try something like this


data: l_cmp_api type ref to if_wd_Component,
      l_window type ref to if_wd_window,
      l_view_ctlr type ref to if_wd_View_controller,
      l_window_ctlr type ref to if_wd_window_controller.

l_cmp_api       = wd_comp_controller->wd_get_api( ).
l_view_ctlr	= wd_this->wd_get_api().
l_window_ctlr	= l_view_ctlr->get_embedding_window_ctlr().

if l_window_ctlr is bound.
   l_window = l_window_ctlr->get_window( ).
      if l_window is bound.
         l_window->set_window_title(
            "please look up the parameter name and set it here.
         ).
      endif.
endif.

Regards,

Satyajit.

Former Member
0 Kudos

Satyajit,

I wanted to award you 10 points for this but there is a major flaw in your code.

The interface "if_wd_window" is for popup windows and not for the application window.

The line of code "<b>if l_window is bound.</b>" will always fail if there is no active popup.

When I read it, I got excited and couldnt wait to try it. I wrote some sample code but it failed.

Thanks.

Prashant Jain

Former Member
0 Kudos

Prashant,

Sorry, my fault. But here's the bad news. I don't think it's possible to change the title of the application window dynamically.

The interface <i>IF_WD_RR_WINDOW</i> has no method to set the title. Only the interface <i>IF_WD_WINDOW</i> has a method to set the title, but that interface is only for a pop-up.

Regards,

Satyajit.

Former Member
0 Kudos

HI,

You can change the title based on the view. Use the property,

window.setTitle(<context attribute>);

You can use the context attribute for the title. Based on the condition set the attribute

Regards,

Saravanan K

Former Member
0 Kudos

I dont think there is a way to change the window title based on the view being displayed. The window title is set when you create the window and can be seen in the windows properties.