on 12-07-2007 5:40 AM
Hi expert,
I have this technical requirement as to Window, I dont know how to implement it:
I have a popup windows, the view of which is from other interface view, no external context mapping. So I want to pass initial parameter to this view, I am not willing to use context mapping, so I do Event.
Actually, with event I can pass the parameter to this view, BUT it happened after init, every first time this window popup with no parameter in properly, but after that parameter will be put in.
My question is how to put in a paramter into the init phase of the view, or is there anything I do wrong when fire the event?
Below is my code to popup the window:
String usercc = UserInfo.getCostCtr();
if (usercc != null && usercc.length() > 0) {
wdThis.wdGetCostCtrInterface().fireCCInitEvent(usercc); //HERE's the fire code.
IWDWindowInfo windowInfo =
(IWDWindowInfo) wdComponentAPI.getComponentInfo().findInWindows(
"CostCtrVS");
// create the dialog
window =
wdComponentAPI.getWindowManager().createModalWindow(windowInfo);
// set the WindowPosition on the screen
window.setWindowPosition(150, 150);
window.show();
//I ALSO TRIED HERE TO FIRE THE EVNET, BUT NO EFFORT
}
Thank you in advance,
William
Hi William,
I had almost an identical problem to solve and here is what works for me:
<b>Code to open an external window which contains my view:</b>
String paramValue = "MyVal";
String appUrl = WDURLGenerator.getWorkloadBalancedApplicationURL(wdComponentAPI.getApplication().getDeployableObjectPart());
// append parameters
appUrl = appUrl.concat("?myParameter="+ paramValue);
// window creation
IWDWindow win = wdComponentAPI.getWindowManager().createNonModalExternalWindow(url,"MyWindow"); win.show();
Upon entering the opened window, which might contain a new view, you can fetch those parameters via:
<b>Fetch parameters from URL:</b>
String myParam = WDProtocolAdapter.getProtocolAdapter().getRequestParameter("myParameter");
The getRequestParameter(String) method is deprecated, but so far - I'm using NW2004s, EP SP 13 - I encountered no problems.
Hope I could help you.
regards,
Christian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.