cancel
Showing results for 
Search instead for 
Did you mean: 

Deselecting Radiobuttons

Former Member
0 Kudos

Hi,

I've created a radiobuttongroupbyindex and when I choose any option an event is launched that sends me to a second view, the problem is that my group always has an option preselected by default and then I can't never choose the first option. I'd like to have the selection cleared by default.

I read the following post:

And I guess that I should use IWDNode.NO_SELECTION, but i don't know how I should use it. The radiobuttongroup is created with the ouput of a RFC.

Thanks in advance for any help you could provide me.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

I guess radiobuttongroupbyindex's selectedkey is bind to some context value. To deselecting the radio button, you can set the context value to blank.

It work for me.

Regards,

Eric

Former Member
0 Kudos

I tried to bind selected keys of radiobuttonGroupbykey and dropdownbuttonbykey to the output of my RFC but nothing is dispIayed, so I tried to use radiobuttongroupsbyindex and dropdownbyindex and then... bingo! My radios and dropdowns are displayed, but I can't pre-select/deselect with this second option, I don't know which is equivalent to selectedkey when using XXXXXXXbyindex elements.

Former Member
0 Kudos

HI

Create a dummy context and map the that dummy context as the default one this may solve your problem

Dummy context is a extra context. when ever you dont want select any thing map the selected to that dummy context

Regrds

Noel

nikhil_bose
Active Contributor
0 Kudos

if you are using RadioButtonGroupByIndex UI:

sol

1. Go to Context, select the node which is binded to RadioButtonGroup element and make the contexts' initializeLeadSelection property to false;

2. wdContext.node<RadioButton>.setLeadSelection( -1); will deselect all RadioButtons in the group.

nikhiL

Answers (1)

Answers (1)

Former Member
0 Kudos

I would not use a radio button selection to navigate to another view. This is confusing for a user. The selection of a RadioButtonGroupByIndex is the lead selection of the bound context node. Thus to deselect the radio button group, set the lead selection of the context node to IWDNode.NO_SELECTION or just -1.

Armin

Former Member
0 Kudos

wdContext.node<RadioButton>.setLeadSelection( -1) was what I was looking for, thanks to all for your time.

Armin, probably it's a bit confusing the navigation through radiobuttons, but our customer wants this functionality because it reduces the number of clicks needed to advance through the views.