on 04-07-2011 10:51 AM
Hi,
Am facing a strange error while the WDP app initialization and its happening some times only if I do again its not happing and I am able to replicate the situation.
Please share with me if have any idea
Caused by: com.sap.tc.webdynpro.progmodel.context.ContextIndexOutOfBoundsException: Node(Ewd_OOFMgt.ewdcomp/Ewd_inboxmgtComp.Display, class=uk.co.britishgas.ict.em.ewd_inboxmgtcomp.wdp.IPublicEwd_inboxmgtComp$IDisplayNode): index out of bounds: index=0, size=0
at com.sap.tc.webdynpro.progmodel.context.ElementList.getLocalElement(ElementList.java:517)
at com.sap.tc.webdynpro.progmodel.context.ElementList.getElement(ElementList.java:538)
at com.sap.tc.webdynpro.progmodel.context.MappedElementList.getElement(ElementList.java:1222)
at com.sap.tc.webdynpro.progmodel.context.Node.getElementAtInternal(Node.java:428)
at com.sap.tc.webdynpro.progmodel.context.Paths.followPath(Paths.java:1464)
at com.sap.tc.webdynpro.progmodel.context.Paths.followPath(Paths.java:1414)
at com.sap.tc.webdynpro.progmodel.context.Paths.getNodeElementFor(Paths.java:516)
at com.sap.tc.webdynpro.clientserver.uielib.standard.uradapter.TableAdapter.getNodeElementByContextPath(TableAdapter.java:30170)
at com.sap.tc.webdynpro.clientserver.uielib.standard.uradapter.TableAdapter.onRowSelect(TableAdapter.java:30093)
at com.sap.tc.webdynpro.clientserver.uielib.standard.uradapter.TableAdapter.onClientRowSelect(TableAdapter.java:29127)
Regards
Rajesh
please post your code first.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Am using CE7.2 SP3 here am posting the some peace of code where am creating the element for the Node and adding
for(int i=0;i<lstInteractionEmployeeDTO.size();i++)
{
if(!arrInbox.contains( lstInteractionEmployeeDTO.get(i).getFkIdInteraction() ))
{
IPublicEwd_inboxmgtComp.IDisplayElement ele = wdContext.nodeDisplay().createAndAddDisplayElement();
arrInbox.add( lstInteractionEmployeeDTO.get(i).getFkIdInteraction());
ele.setInteractionShortDesc(lstInteractionEmployeeDTO.get(i).getSubject());
if(lstInteractionEmployeeDTO.get(i).getReceivedDate()!=null){
ele.setInteractionDate(new java.util.Date(lstInteractionEmployeeDTO.get(i).getReceivedDate().getTime()));
}
}
*Note : error is not throwing always randomly its hitting in pre production the same code is working very fine with all other boxes.
Regards
Rajesh
Hi,
You should add element created into the node. Here in your code you have not added it. Adding element might resolve your problem.
for(int i=0;i<lstInteractionEmployeeDTO.size();i++)
{
if(!arrInbox.contains( lstInteractionEmployeeDTO.get(i).getFkIdInteraction() ))
{
IPublicEwd_inboxmgtComp.IDisplayElement ele = wdContext.nodeDisplay().createAndAddDisplayElement();
arrInbox.add( lstInteractionEmployeeDTO.get(i).getFkIdInteraction());
ele.setInteractionShortDesc(lstInteractionEmployeeDTO.get(i).getSubject());
if(lstInteractionEmployeeDTO.get(i).getReceivedDate()!=null){
ele.setInteractionDate(new java.util.Date(lstInteractionEmployeeDTO.get(i).getReceivedDate().getTime()));
}
wdContext.nodeDisplay().addElement(ele); // This line was missing.
}
Try this hope you get resolved with the problem.
Regards,
Deepak Dwivedi.
Hi,
Create an element of that context node in the wdInit of the view.
Thanks & Regards
Kaushik Banerjee
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rajesh,
This error often occurs when you try to set value for any element in a node whose cardinality is 0....n . To overcome this problem you should first create the element then add it the node.
Regards,
Deepak Dwivedi.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
92 | |
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.