on 10-18-2007 6:08 AM
Hi all,
When I use following event handler method in a WebDynPro, its giving "response cannot be resolved" error. I'm I missing some imports? or some .jar files
Please advise me
Thanks in advance
public void onPlugfromStartView(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
//@@begin onPlugfromStartView(ServerEvent)
String firstname = wdThis.wdGetExc_ContectController().wdGetContext().currentContextElement().getCmpCtx_firstname();
String lastname = wdThis.wdGetExc_ContectController().wdGetContext().currentContextElement().getCmpCtx_lastname();
if((firstname != null) & (lastname != null)){
<b>response</b> = "Hello, "firstname" "+lastname;
}else{
<b>response</b> = "Hello, stranger";
}
wdContext.currentContextElement().setCtx_txtviewResult(<b>response</b>);
//@@end
}
Reg,
Naresh
Hi,
From ur code, looks like, u miss the decalration for response.
String response = null;
Add this line before if loop. Others look fine only.
Regards,
Harini S
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
String response = null should help.
Otherwise
try
response = "Hello, " + firstname + " " + lastname;
give appropiate spaces. Cannot see anything else stopping the show.
Regards,
Atul Shrivastava
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.