on 03-17-2008 6:09 AM
Hi All,
I am trying to make some enhancements in the MAU application. Like we have an ActivityManagement jsp page which consists of 4 tabs. Every tab is a jsp page which has its own table of contents.
Now I want to add a new tab which is a jsp page & wanted to add few fields like the other jsp's.
i am able to get the tab but i am not able to display the fields in that.
on the onLoad() event in the view controller I have added the code :
public Forward onLoad(Forwards forwards)
{
BOList paymentList = null;
try{
paymentList = i11PaymentManager.getI11Payments();
com.sap.mbs.tools.list.ListData displayListData = fillObjectList(paymentList);
com.sap.mbs.tools.list.ListHeader displayListHeader = com.sap.mbs.tools.list.ListParser.getHeader("PaymentList");
setListAttributes(displayListHeader, displayListData, null, null, "onNavigate");
}
catch(BOException boe){
return handleApplicationError(forwards, null, "onLoad", PropertyMgr.getText("MAM_ERROR_OBJECT_NOT_FOUND"));
}
Context context = getContext();
context.addValue("canCreate", "false");
return forwards.findForward("default");
}
but when I am adding <list:list/> in the desired jsp page. it starts giving error. I have made the entry in the ZListDef.xml file as well.
ERROR :
Location: /MAU30/zcustom/meter_reading_result_list.do
Internal Servlet Error:
java.lang.ClassCastException
at com.sap.mbs.mau.zcustom.control.ZCustomManagement.(ZCustomManagement.java:35)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
according to this description the error is in private final I11PaymentManager i11PaymentManager = (I11PaymentManager)naming.lookup(I11PaymentManager.class.getName());
Can any one help me with this. your ideas and suggestions are truely welcome
Thanks & Regards
Neha Mahanty
Hi Neha,
I have a question, is ZCustomManagement.java name of your controller class for the jsp you are trying to fetch the list?
Looking through the code, this type of exception comes when you are trying to assign a object of a type to another type which is not compatible with each other , in short cannot be type casted.
Now in your code,
1) check whether i11PaymentManager.getI11Payments() method is fetching the BOList
2) try to debug the method fillObjectList(paymentList), I suspect this is where the code is failing.
Hope you find this helpful!
Warm Regards
Priya Ghosh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Neha,
naming.lookup(I11PaymentManager.class.getName());
is looking for a class implementation in core.config file.
you have to extend it by creating zcore.config.
Regards,
Larissa Limarova
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
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.