cancel
Showing results for 
Search instead for 
Did you mean: 

java.lang.NullPointerException

Former Member
0 Kudos

Dear Members,

I am using some DropdownByIndex in my View where I fill data from RFC. Pl.help me to solve following exception:

-


java.lang.NullPointerException

at com.sap.tc.webdynpro.progmodel.context.Paths.fillPathToNode(Paths.java:166)

at com.sap.tc.webdynpro.clientimpl.html.uielib.standard.uradapter.DropDownByIndexAdapter.setViewAndNodeElement(DropDownByIndexAdapter.java:227)

at com.sap.tc.webdynpro.clientimpl.html.uielements.adaptmgr.URAdapterManager.getAdapterFor(URAdapterManager.java:231)

at com.sap.tc.webdynpro.clientimpl.html.uielements.adaptmgr.URAdapterManager.getAdapterFor(URAdapterManager.java:64)

at com.sap.tc.webdynpro.clientimpl.html.uielib.standard.uradapter.TableAdapter$ContentCell.setViewAndNodeElement(TableAdapter.java:975)

at com.sap.tc.webdynpro.clientimpl.html.uielib.standard.uradapter.TableAdapter$Cells.next(TableAdapter.java:8186)

at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.SapTableRowRenderer.renderSapTableRowFragment(SapTableRowRenderer.java:65)

at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.SapTableRowRenderer.render(SapTableRowRenderer.java:33)

at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:269)

at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:95)

at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.SapTableDefaultBodyRenderer.renderSapTableDefaultBodyFragment(SapTableDefaultBodyRenderer.java:145)

at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.SapTableDefaultBodyRenderer.render(SapTableDefaultBodyRenderer.java:29)

at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:269)

at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.base.AbstractRenderManager.render(AbstractRenderManager.java:95)

at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.SapTableRenderer.renderSapTableFragment(SapTableRenderer.java:409)

at com.sap.tc.webdynpro.clientimpl.html.renderer.uielements.ie6.SapTableRenderer.render(SapTableRenderer.java:57)

-


-


More Lines: If required I will send it.

-


-


Thanks & Regards,

Prakash

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

The Text property is already bound with a context which is mapped with Data Model.

Can you pl. analyze the error which I am getting.

Thanks & Regrads,

Prakash

Former Member
0 Kudos

Hi Prakash,

Can you paste your code here, especially the line

at com.sap.tc.webdynpro.progmodel.context.Paths.fillPathToNode(Paths.java:166)

Best Regards,

Nibu.

Former Member
0 Kudos

Dear Nibu,

I am unable to locate this file. Pl. help.

Thanks & Regards,

Prakash

Former Member
0 Kudos

Hi Prakash/Nibu,

That file is not a part of his project, but it is part of the webdynpro APIs. So, no need to check there. Please provide your code here. So, I can look into it where exactly you are getting error.

Regards,

Bhavik

Former Member
0 Kudos

Dear Bhavik,

Here I am writing Step by step,

My application have to view, first having few Command Button, another having Few UIs also DropDownByIndex, I have created a model a Custom Control, mapped that model with custom control and second view with custom control. In the DropdownbyIndex text property bind with the related output context.

Now in Implentation of Second view,

public void wdDoInit()

{

//@@begin wdDoInit()

wdThis.wdGetCustSOCreateController().executePOList();

wdThis.wdGetCustSOCreateController().executeContractList();

wdThis.wdGetCustSOCreateController().executeMatList();

wdThis.wdGetCustSOCreateController().exceuteDistChan();

//@@end

}

And Custom Controller have all the methods, here I am providing 1,

public void excutePO( )

{

//@@begin excutePO()

IWDMessageManager manager = wdComponentAPI.getMessageManager();

try {

Z_Websales_F4_Po_Input ele = new Z_Websales_F4_Po_Input();

wdContext.nodeZ_Websales_F4_Po_Input().bind(ele);

String cust = "0005300022";

ele.setZcustomer(cust);

wdContext

.currentZ_Websales_F4_Po_InputElement()

.modelObject()

.execute();

wdContext.nodeOutput_Po().invalidate();

} catch (WDDynamicRFCExecuteException ce) {

manager.reportException(ce.getMessage(), false);

}

//@@end

}

-


Pl. let me know if any futher information required.

Thanks & Regards,

Prakash

Former Member
0 Kudos

Hi Prakash,

I guess this problem is not in your code. But, you missed some bindings of your UI element or the context mappings. Check for the same. Or try to delete that dropdownbyindex element and test application. Then insert new dropdown element once again, bind all required properties and then test.

Regards,

Bhavik

Former Member
0 Kudos

Hi Bhavik,

Thanks a lot for the correction !

And Prakash,

I am extremely sorry for misleading you !

Best Regards,

Nibu.

Former Member
0 Kudos

Thanks Bhavik. This working now when I redraw and mapped the UIs again.

Regards,

Prakash

Former Member
0 Kudos

Hi Prakash,

Nice to hear that you have solved your problem.

Please close this thread.

Regards,

Bhavik

Former Member
0 Kudos

Hi Bhavik,

Again I faced similar problem, what I realised is that this exception came when a table have UI Dropdownbyindex and bind with the context.Same dropdownbyindex UI outside of table is working.

Can you pl. tell me the binding method og Dropdownbyindex UI within a table.

Regards,

Prakash

Former Member
0 Kudos

Hi Prakash,

Ohhh Are you using Dropdown in Table?

Then surely it will give such error.

Check following links for your problem.

Regards,

Bhavik

Former Member
0 Kudos

Hi Bhavik,

I have seen the threads but they are talking for Dropdownbykey.

I have the Input table which is not bind with any context, I only want to bind Material Column with the List from RFC.

Plz. help.

Regards,

Prakash

Former Member
0 Kudos

Hi Prakash,

You cannot use dropdownbyindex element in such a scenario. You have to use dropdownbykey ui elements. Use dropdownbykey instead of dropdownbyindex element.

Regards,

Bhavik

Former Member
0 Kudos

Hi,

It should work if you bind the Text property of theDropdownByIndex UIElement.

Regards, Anilkumar

Former Member
0 Kudos

Check if property DropDownByIndex.<b>texts </b>is bound to a context attribute contained in a multiple node.

(There is no data source property)

https://media.sdn.sap.com/javadocs/NW04/SP12/webdynpro/com/sap/tc/webdynpro/clientserver/uielib/stan...

Armin

Message was edited by: Armin Reichert

Former Member
0 Kudos

Hi,

Please set the data source property of the DropdownByIndex UIElement.

Regards, Anilkumar

Former Member
0 Kudos

Dear Anilkumar,

I had bind the Text Property with the Context, where to bind data source. Can you pl. suggest as I am a beginner in this.

Thanks & Regards,

Prakash