How can I trigger OnChange of ButtonGroup which is wrapped by a link?

Hi,

I'm facing the above issue when I wrapper a ButtonGroup by a link, the OnChange event did not trigger. Of course, when I remove this link, It happens correctly. But how can I trigger the OnChange for ButtonGroup with ButtonGroupItem without removing the contained link?


Thanks.

What exactly do you want to perfom with that? When you click do you want to follow the link or use the OnChange Action? 

If you want to trigger an Action with the link why not place that Action inside of "OnChange". If you want to go to another destination via the link why bother with "OnChange"?

You could place the destination of the link at the end of the OnChange action and remove the link, since the "link" in your hierarchy has his own OnClick event which should be triggered before any of the lower events. 

Another solution might be to trigger "OnChange" inside of the links destination or Action, but there might be no change, since the "link" intercepts all that.

Hi Vu Le Huy,

Objective: how can I trigger the OnChange for ButtonGroup with ButtonGroupItem without removing the contained link?

Note: It is not allowed to wrap the ButtonGroup widget with link even though you wrap the ButtonGroup widget within a container and wrap the container with link.

Solution: Wrap the Button Group widget with a container and define the onclick handler of the container with any of the screen action as mentioned below..

Check this: ButtonGrp Demo Screen

Hope this helps you!


Regards,

Benjith Sam