cancel
Showing results for 
Search instead for 
Did you mean: 

How to set a dropdown to the blank line value

Former Member
0 Kudos

Hi all,

maybe a very easy question.

How can I set a dropdownbyindex value to the blank line?

If I use e.g.

wdContext.currentActionsElement().setDescription(null);

it adds another blank line among the values and if I try with:

wdContext.nodeActions().setLeadSelection(0);

it doesn't work.

Any suggestion?

Thanks in advance.

Angelo

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

wdContext.nodeActions().setLeadSelection(IWDNode.NO_SELECTION);

Check that node selection is not mandatory (i.e. selection cardinality is 0..1, not 1..1).

If this does not help set initializeLeadSelection to false for this node.

VS

Former Member
0 Kudos

Thanks Valery,

I can use -1 or IWDNode.NO_SELECTION for setLeadSelection.Maybe the second one is more general.

Anilkumar, using "" to set the description I receive a null pointer exception.

Thanks again both.

Angelo

Answers (1)

Answers (1)

Former Member
0 Kudos

Try this

wdContext.currentActionsElement().setDescription("");

Regards, Anilkumar

Former Member
0 Kudos

Thanks Anikumar,

I solved using

wdContext.nodeActions().setLeadSelection(-1);

Bye!