I use Wicket and would like to create a grid of radio buttons using HTML, as shown below (external lists will be displayed vertically, internal lists will be displayed horizontally).
The number of groups is variable - it can be ABC, ABCD, ABCDE, etc.
I would like the switches to be grouped vertically.
<ul>
<li>
<ul>
<li><input type="radio" name="A"></li>
<li><input type="radio" name="B"></li>
<li><input type="radio" name="C"></li>
</ul>
</li>
<li>
<ul>
<li><input type="radio" name="A"></li>
<li><input type="radio" name="B"></li>
<li><input type="radio" name="C"></li>
</ul>
</li>
<li>
<ul>
<li><input type="radio" name="A"></li>
<li><input type="radio" name="B"></li>
<li><input type="radio" name="C"></li>
</ul>
</li>
</ul>
Unfortunately, it seems that it RadioGroupallows you to group radio buttons in accordance with the grouping defined by their layout.
eg:.
RadioGroup group = new RadioGroup("radioGroupA");
group.add( new Radio("myradio", new Model(1)) ;
The problem is that I cannot lay out the elements the way I want.
Is there another way? Manually specify a name and collect results?
UPDATE: , Radio RadioGroup . - :
for (0..n) {
RadioGroup group = new RadioGroup("myRadioGroup", new Model { .. } );
groupArray.add(group)
}
ListView radioListView = ListView("radioGroupList") { populate from groupArray }
add(radioListView);
for (0..x) {
for (0..n)
add( new Radio("myradio", new Model(1), groupArray.get(n) ));
}
}
Radio RadioGroup , .
<form>
<span wicket:id="radioGroupList">
<span wicket:id="radioGroup"/>
</span>
<ul>
<li><radio wicket:id="myradio"/></li>
, , :
WicketMessage: http post [radio33] RadioGroup [2: tContainer: list: 2: tPanel: myForm: orderedRadioGroupList: 0: orderedRadioGroup] , . RadioGroup Radio, . , .
, ?
"" , .
Wicket 1.4.12.
Apache, : https://issues.apache.org/jira/browse/WICKET-1055