on 09-26-2007 7:58 AM
I tried it but a null pointer exception is occuring. Is it possible to pass parameters ,if s give the solution....
Thanks and regards.
Karthik.
Hi Karthi,
Directly it is not possible. You can achieve it by this way.
1> Create 2 Event Handlers say OK and OKTest.
public void OK(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
//@@begin OK(ServerEvent)
String param = "abc";
wdThis.OKTest(wdEvent,param);
//@@end
}
public void OKTest(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, java.lang.String paramtest )
{
//@@begin OKTest(ServerEvent)
wdComponentAPI.getMessageManager().reportSuccess("Param : "+paramtest);
//@@end
}
2> Code for popup.
String dialog = "No of Rows : ";
IWDConfirmationDialog confDialog = wdComponentAPI.getWindowManager().createConfirmationWindow(dialog,wdThis.wdGetAPI().getViewInfo().getViewController().findInEventHandlers("OK"),"OK");
confDialog.setTitle("Test Window");
confDialog.show();
/thread/66776 [original link is broken]
Regards,
Mithu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Karthi,
You are taking the param of type "com.sap......Parameter"
thats why it is giving error. what error r u getting?
public void OkTest(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, java.lang.String paramtest )
i have taken the <b>paramtest</b> of type <b>String</b>.Check the signature of event handler. It will definitely work.
Regards,
Mithu
Hi mithu,
public void OkTest(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, com.sap.IPrivateTestView.IListElement paramtest)
{
pass to customcontroller method
}
This is the parameter i am using,but i am getting error in the ok() method as(The local variable node element may not be initialized) not intialized. How to initialize this parameter..
void ok()
{
com.sap.IPrivateTestView.IListElement paramtest;
wdthis.okTest(wdEvent,paramtest);
}
Hi,
How will you use the paramaters? Just curious to know.
Are you talking about passing the parameter for the Eventhandler of the Confirmation Dialog?
-np
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
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.