cancel
Showing results for 
Search instead for 
Did you mean: 

OVS Application

Former Member
0 Kudos

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

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

Try setting cardinality of the node POData to 1..1.

Regards

Akshaya

Former Member
0 Kudos

Hi Akshaya,

The cardinality of PoData is already set to 1..1 and selection is 0..1 only...

Regards

Padma N

Former Member
0 Kudos

Hi

May be you are providing wrong attribute name .

Regards

Akshaya

Former Member
0 Kudos

Hi all,

Means where i am providing wrong attriburte name..i am not getting where i am doing mistake....

can u plz help me out in this

Regards

Padma N

Answers (2)

Answers (2)

former_member751941
Active Contributor
0 Kudos

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

former_member197348
Active Contributor
0 Kudos

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