cancel
Showing results for 
Search instead for 
Did you mean: 

TableFilter.java NullPointerException

nikhil_bose
Active Contributor
0 Kudos

Using TableFilter.java from /people/peter.vignet/blog/2007/01/03/generic-web-dynpro-java-table-filter blog, on running the application it shows

{color.blue}java.lang.NullPointerException

at com.sap.demos.table4.TableFilter.setFiltersForColumns(TableFilter.java:117)

at com.sap.demos.table4.TableFilter.init(TableFilter.java:71)

at com.sap.demos.table4.TableFilter.<init>(TableFilter.java:48)

at com.sap.demos.table4.Table4_ComponentsView.wdDoModifyView(Table4_ComponentsView.java:145)

at com.sap.demos.table4.wdp.InternalTable4_ComponentsView.wdDoModifyView(InternalTable4_ComponentsView.java:447)

What could be wrong?

thanks in advance,

nikhil

Accepted Solutions (1)

Accepted Solutions (1)

former_member201361
Active Contributor
0 Kudos

Hi,

have you changed the value "null" in thw doModify method to new HashTable();

//@@begin wdDoModifyView

if (firstTime ) {

IWDTable table = (IWDTable) view.getElement("Table");

wdContext.currentContextElement().setTableFilter( new TableFilter(table, wdThis.wdGetFilterAction(), //wdContext.nodeSource(),null));

//change it to new HashTable();

wdContext.nodeSource(),new Hashtable();

}

//@@end

}

thanks and regards

fazal

Former Member
0 Kudos

Hi Nikhil,

It will be helpful for all if you can open TableFilter.java and copy code at line number 117 here in forum.

Regards,

Gopal

nikhil_bose
Active Contributor
0 Kudos

Gopal,

This is no change in TableFilter.java. Change is needed where we initializing the TableFilter().

In Dynpro, we are setting TableFilter context object to TableFilter Object.

And fazal has the change as bold. Look at his post

again, thanks fazal

regards,

nikhil

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

Try to compare it with the source available as part of this article

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/60d5b593-ba83-2910-28a9-a7a7c7f5...

Regards

Ayyapparaj

nikhil_bose
Active Contributor
0 Kudos

I have cross-checked that article too. but still have the problem!

could you shed some more suggestion?