on 06-13-2014 8:26 AM
How to pass title of window at run time, while opening the window on click of button in WebDynpro java?
I want to pass Context Attribute to it.
Hi Suchita,
this is quite simple if you know what to do:
1. Link your component controller with your main window
2. Use this line:
wdThis.wdGetTestCompWindowController().wdGetAPI().getUI().setTitle("TitleYouWant");
In my case the window is named "TestComp". Just replace that with your window name.
Regards Tobias.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Tobias,
This will set the title for the current Window.
But my case is from my main window on click of a button a pop up window opens and i want to pass context attribute as title to that window.
public void onActionOpenABCWindow(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent)
{
wdThis.wdGetComponentController().openWindow("ABC");
}
From here i want to set the title to the pop up window.
Regards,
Suchita
Dear Suchita,
You can use IWDWindowViewElement API to set the title.
// bind the context attributes “title” to window property title
attrInfo = wdContext.getContext().getRootNodeInfo().getAttribute("title");
window.bindTitle(attrInfo);
Thanks & Regards,
Patralekha
Ok then try this,
IWDWindowInfo windowInfo = wdComponentAPI.getComponentInfo().findInWindows("YourWindowName");
IWDWindow window = wdComponentAPI.getWindowManager().createModalWindow(windowInfo);
window.setTitle("YourWindowName")
window.show();
So you can safe the IWDWindow window in a context attribute and just set the title before you show your window again.
Hi Suchita,
use this .
window.setTitle("pass the dynmaic attribute value here");
Regards,
Anil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.