Skip to Content
0
Former Member
Apr 15, 2008 at 09:33 AM

changing window title based on the application

153 Views

Hi Experts,

I have One window with two applications.

I want to change browser title ( window title ) based on the application from which,it is called.

I wrote the below code in the Init method of comp Controller.

String appName=wdComponentAPI.getApplication().getName();

* String windowTitle="";*

* //Set window title based on the application from which it is called...*

* if(appName.equalsIgnoreCase("ContractorEndDate")){*

* windowTitle="Contractor end date";*

* }else*

* { windowTitle="Deactivate contractor";*

* }*

* IWDWindowInfo wininfo = wdComponentAPI.getComponentInfo().findInWindows("VcTempEndDate");*

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

* ((Window) window).setTitle(windowTitle);*

But Its throughing me the error.

How can I achieve this...

Regards,

Naresh