Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.4.9
-
None
Description
Please change the scope of the method isSelected in the class org.apache.wicket.extensions.markup.html.form.select.Select to public so that it can be called from elsewhere or even overridden in subclasses elsewhere.
Background: In our current project we came to the conclusion that the Choice classes of the Wicket core are not suitable to implement panels with radio buttons, where the radio buttons need to be rendered from an EnumSet or from Collection. We particularly needed to be able to define the markup of each option in a template. Moreover we needed to be able to define the CSS classes on the option tag itself. Another requirement was Ajax support, in which the selection of a radio button is immediately submitted to the server. We had a look at the class org.apache.wicket.extensions.markup.html.form.select.Select which we knew was doing a good job for drop-down boxes in the way we needed it. We made the decision to create additional classes around it to support radio buttons. Our approach worked, but we had to use Java Reflection because the crucial method isSelected in the Select class is package local. Will there be changes in the Wicket core or in wicket-extensions to improve the support for radio buttons? I heard that in 1.5 there may be improvements.