cancel
Showing results for 
Search instead for 
Did you mean: 

Null exception on selecting the empty value

Former Member
0 Kudos

Hi all,

I've a dropdown by index (filled with a db table's values) on a view and when I select the empty value (that is also the first one) I get a nullpointer exception. Any idea?

Thanks in advance.

Angelo

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member182372
Active Contributor
0 Kudos

Hi Angelo,

Could you please post a stacktrace?

Best regards, Maksim Rashchynski.

Former Member
0 Kudos

well, if I add that code line I don't receive the expection but when I select the blank row again the selection is not saved.

That blank value is useful for me to avoid any specific selection.

Thanks for your help.

Angelo

Former Member
0 Kudos

Hi Angelo,

if you dont want the first value to be empty, set the collection cardinality of the context node bound to the dropdwon control to 1..n

and check it with lead selection for overcoming the null pointer exception, than explicilty trying to access the code

Former Member
0 Kudos

Solved!

if (wdContext.node<node>().getLeadSelection() != -1) {

}