openui5 icon indicating copy to clipboard operation
openui5 copied to clipboard

Event "select" in RadioButton not launched when part of RadioButtonGroup aggregation

Open jpenninkhof opened this issue 11 years ago • 3 comments

When a RadioButton is used in a RadioButtonGroup, the event "select" doesn't seem to be getting executed. The "select"-event on RadioButtonGroup level is properly executed though. If is behavior is by design, it would be good to point this out in the documentation.

jpenninkhof avatar Sep 01 '15 17:09 jpenninkhof

Tracked internally: 1580056470

christianegoebels avatar Sep 02 '15 09:09 christianegoebels

Hello jpenninkhof,

the RadioButtonGroup wraps a list of RadioButtons. In order to execute some code after a RadioButton has been selected use the select event of the RadioButtonGroup. The event will contain a "index" parameter indicating which button was selected. If this informaction is not sufficient you can use the function "getSelectedButton" which will return all the information about the RadioButton that was selected.

Regards, Marin Parushev (OpenUI5 Maintenance Support)

marinparushev avatar Jan 25 '16 16:01 marinparushev

Hi Martin, this issue wasn't so much a bug in the framework, but rather in the documentation. Documentation now mentions:

Event Detail select(oControlEvent) Event is triggered when the user makes a change on the radio button (selecting or unselecting it).

It would be good to add add a note mentioning that the event is not fired when the RadioButton is part of a RadioButtonGroup, e.g.

Event Detail select(oControlEvent) Event is triggered when the user makes a change on the radio button (selecting or unselecting it). Note: Event is only triggered when it is not included in a RadioButtonGroup.

Best regards, Jan Penninkhof

jpenninkhof avatar Jan 26 '16 10:01 jpenninkhof