on 05-19-2008 7:37 PM
Hi,
i new to WebDynpro,
i do the exercise 3 from Ja312 and in the Book i have to Add
this code Below:
the problem is that i have redlines in getCmp_firstname
and in response how can i solve it?
Regards
public void onPlugFromStartView(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
//@@begin onPlugFromStartView(ServerEvent)
String firstname =
wdThis.wdGetExc_IntroController().wdGetContext().
currentContextElement().getCmp_firstname();
String lastname =
wdThis.wdGetExc_IntroController().wdGetContext().
currentContextElement().getCmp_lastname();
if ( ( firstname!=null ) & (lastname!=null)){
response = "hellow , "+firstname+" " +lastname ;
}else {
response = "Hellow, stranger";
}
wd.Context.currentContextElemnt().set_txtviewresult(response);
//@@end
}
Hi Ricardo,
For resolving the issue, please go to the component controller "Exc_IntroController" and select the context tab. There you will find the attribute under Context. There should be n attribute with name exactly as 'Cmp_firstname'. If the name is not exactly same then replace the below line of code with the exact name:
String firstname =
wdThis.wdGetExc_IntroController().wdGetContext().
currentContextElement().get_Cmp_firstname_();
Hope this resolves your issue.
Regards,
Arafat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
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.