on 12-05-2007 8:55 AM
Hi all,
i did a sample application in OVS just like given in pdf Advanced Input Help - The Object Value Selector (OVS)
I had a single view called ViewOVS and the code i wrote in wdDoint() method is '
public void wdDoInit()
{
//@@begin wdDoInit()
IWDAttributeInfo[] ovsStartUpAttributes = { wdContext.nodePOData() .getNodeInfo().getAttribute("Ebeln")};
IWDOVSContextNotificationListener listener = wdThis.wdGetCustOVSController().getOVSListener();
WDValueServices.addOVSExtension("Data Selection",ovsStartUpAttributes,
wdThis.wdGetCustOVSController().getOVSInputNode(),
wdThis.wdGetCustOVSController().getOVSOutputNode(),listener);
//@@end
}
but while running it is showing nullpointer exception as
Error stacktrace:
java.lang.NullPointerException
at com.sap.tc.webdynpro.progmodel.valuehelp.ContextBasedOVSProvider.<init>(ContextBasedOVSProvider.java:47)
at com.sap.tc.webdynpro.progmodel.valuehelp.ValueServices.addOVSExtension(ValueServices.java:48)
at com.sap.tc.webdynpro.progmodel.api.WDValueServices.addOVSExtension(WDValueServices.java:86)
at com.sap.tc.webdynpro.ovs.ViewOVS.wdDoInit(ViewOVS.java:102)
at com.sap.tc.webdynpro.ovs.wdp.InternalViewOVS.wdDoInit(InternalViewOVS.java:119)
at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.doInit(DelegatingView.java:61)
at com.sap.tc.webdynpro.progmodel.controller.Controller.initController(Controller.java:215)
at com.sap.tc.webdynpro.progmodel.view.View.initController(View.java:274)
at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:540)
Can anyone plz help me out in this
Regards
Padma N
Hi
Try setting cardinality of the node POData to 1..1.
Regards
Akshaya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Padma,
Set the cardinality and selection of PoData to 0..1.
inside wdDoInit initialize the PoData node.
wdContext.nodePoData().bind(wdContext.createPoDataElement());
IWDAttributeInfo ovsStartUpAttributes[] = { wdContext.nodePOData() .getNodeInfo().getAttribute("Ebeln")};
IWDOVSContextNotificationListener listener = wdThis.wdGetCustOVSController().getOVSListener();
if (listener != null) {
WDValueServices.addOVSExtension("Data Selection",ovsStartUpAttributes,
wdThis.wdGetCustOVSController().getOVSInputNode(),
wdThis.wdGetCustOVSController().getOVSOutputNode(),listener);
}
1> Make sure attribute name(<b>Ebeln</b>)is correct.
2> Cardinality and selection of node OVSInputNode is 0..1
3> Cardinality of node OVSOutputNode is 0..n and selection is 0..1
4> You have provided the implementation for methods
i)getOVSListener
ii)getOVSInputNode
iii)getOVSOutputNode
Regards,
Mithu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Padma,
Is the error in the line IWDOVSContextNotificationListener listener;
There was a problem in the sample tutorial. I think in implementation of getOVSListener();
Can you check it once?
regards
Siva
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
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.