Description
Problem occurs when using a listView with a checkgroup in the same form with a input Validator. When the Validator detects invalid input and no items from the CheckGroup were selected, Wicket throws a NullPointer Exception on the first ListView item.
Specifically, in the Check class, the group.getInputAsArray() returns null and causes the NPE:
if (group.hasRawInput()) {
final String[] input = group.getInputAsArray();
for (int i = 0; i < input.length; i++)
{ ....
The problem is solved by overriding the isNullable() method for CheckGroup to return false.
@Override
public boolean isInputNullable()
Apologies for describing symptoms rather than mechanism. More experienced programmers in the office think the model for CheckGroup is not attached or detached properly when used in conjunction with the (Pattern)Validator.