on 04-14-2008 6:39 AM
Hi,
Im trying to write a method of my own - myMethod() in "Others", and i want to call this method in wdDoModifyView().I want to display a message in myMethod().So iam doing like this:
........................
public static BigDecimal myMethod(String name, int age, String designation){
IPrivate<View> wdThis;
IPrivate<View>.IContextNode wdContext;
com.sap.tc.webdynpro.progmodel.api.IWDView view;
IWDMessageManager msgMgr = wdThis.wdGetAPI.getComponent.getMessageManager();
msgMgr.reportSuccess("Success");
..........
}
as suggested by Armin.But i m getting the error in the below line as "wdThis may not have been initialized"
IWDMessageManager msgMgr = wdThis.wdGetAPI.getComponent.getMessageManager();
Please suggest me how to write print statement in myMethod in "Others".
Regards,
Padmalatha.K
Hi,
Add the wdThis as part of the signature of your custom method
public static BigDecimal myMethod(String name, int age, String designation, IPrivate<YourCompView> wdThis){
}
Regards
Ayyapparaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Padma,
You can use the following statements to print the message.
IWDMessageManager msgMgr = wdComponentAPI.getMessageManager();
msgMgr.reportSuccess("Success");
or
wdComponentAPI.getMessageManager().reportSuccess("Success");
Thanks n Regards,
Jhansi Miryala
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.