Widget fieldWidget = new Widget(
page,
new Rectangle(150, 50, 136, 36)
);
WidgetActions fieldWidgetActions = new WidgetActions(fieldWidget);
fieldWidget.setActions(fieldWidgetActions);
fieldWidgetActions.setOnActivate(
new JavaScript(
document,
"app.alert(\"Radio button currently selected: '\" + this.getField(\"myRadio\").value + \"'.\",3,0,\"Activation event\");"
)
);