on 04-15-2008 10:33 AM
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
Hi Naresh,
try this code in your component Controller
public void CallWIndow( java.lang.String name )
{
//@@begin CallWIndow()
IWDWindowInfo info = wdComponentAPI.getComponentInfo().findInWindows( "Win_pop");
IWDWindow window = wdComponentAPI.getWindowManager().createModalWindow( info);
window.setWindowPosition( WDWindowPos.CENTER);
window.setWindowSize( 400, 250);
wdContext.currentContextElement().setWindowTitle( window);
window.setTitle( name);
window.show();
//@@end
}
set a context element of type String and that would be passed as argument to this function from different contexts and there will be corresponding entries and mapping would be made in those contexts. You can pass the argument according to the URL that you specified.
Regards
Vinod V
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Why dont you specify the title in the window properties and create seperate windows for your application?
Regards
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hallo,
in NetWeaver CE 7.1 the Web Dynpro Java Runtime API provides a method to set the window title programmatically at runtime:
In the (root component's) window controller implementing the interface view your Web Dynpro appliation points to implement the following code line in the wdDoInit() hook method:
wdControllerAPI.getUI().setTitle("My dynamic window title");
Regards, Bertram
Hallo Ayyapparaj,
when wdControllerAPI.getUI() is called within the root-component's window controller (implementing the interface view of your Web Dynpro application) you operate on the application window instance. When you call getUI() in a window controller of an embedded component (implmenting the component interface view) you get back null. When you call this method in a root window controller of a popup window you can dynamically set the popup window title.
This API is first available in NW CE 7.1 (I do not know the exact first Service Pack Stack).
Regards, Bertram
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.