cancel
Showing results for 
Search instead for 
Did you mean: 

Drop Down By Index

Adi_Bathineni
Participant
0 Kudos

Hi Gurus,

I've one problem with the Drop Down By Index in the WEBDYNPRO JAVA.

I'm filling the Drop Down By Index from the node based on some condition.

Based upon the condition the node has only one record.

After adding the node data to my drop down by index i'm getting the data but the problem is i'm getting two rows in the drop down by index.

First one is Empty string and the second is the actual value.

I've written some logic on the "onselectionchange" of the Drop Down By Index.

There if i select the empty string i'm getting the following error

"java.lang.NullPointerException "

How to resolve this issue.

Thanks in advance.

Regards,

Adi.

Accepted Solutions (0)

Answers (3)

Answers (3)

Adi_Bathineni
Participant
0 Kudos

This message was moderated.

raja_thangamani
Active Contributor
0 Kudos

"onselectionchange" you can check whether the selected key is not null before you go ahead with the process.

wdContext.your_selectedKey_variable!=null

Raja T

Greg_Austin
Active Participant
0 Kudos

You can either check that something is selected in onselectionchange and not execute whatever is giving you the error, or on the node that fills the drop down set the selection property to 1...1, this will remove the blank option from the drop down.

Adi_Bathineni
Participant
0 Kudos

thanks...

the solution is working

selection property should be 1..1 in order to remove the empty row of drop down box by index.

Regards,

Adi.

Greg_Austin
Active Participant
0 Kudos

Adi can you please mark this questions as answered.

Thanks

Adi_Bathineni
Participant
0 Kudos

Hi Guru's,

One more problem...

The solution is working fine for removing the Empty row from the drop down by index, but when i select some thing in the dropdown box it is always pointing to the First row only???

Why it is behaving like that??/

Thanks in adavance.

Regards,

Adi