wicket-8

Wicket 6 to 8 upgrade: RadioGroup.onSelectionChanged() replacement

微笑、不失礼 提交于 2021-01-28 00:33:35
问题 We have inherited a large code base that uses Wicket 6 where we have a RadioGroup of preferred contact type choices (SMS, e-mail, etc). When a Radio for SMS is selected, a TextField for phone number is made visible, same for e-mail and so on. This has been implemented by adding an AjaxEventBehavior for "onclick" event to each Radio . The onEvent(AjaxRequestTarget) method calls RadioGroup.onSelectionChanged() and updates the visibility of each TextField : radioSms = new Radio<>("sms", ...);