Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
1.5.3
-
None
-
JDK 1.6u27, Win64, Google Chrome 15.0.x
Description
Full stack trace is:
Uncaught TypeError: Cannot read property 'length' of undefined:
(anonymous function)CheckGroupSelector-ver-1323970753862.js:35
Wicket.CheckboxSelector.updateAllCheckboxesAbstractCheckSelector-ver-1323970753862.js:35
(anonymous function)
Caused by CheckGroupSelector.java:
@Override
protected CharSequence getFindCheckboxesFunction()
{
CheckGroup<?> group = getGroup();
if (group == null)
return "Wicket.CheckboxSelector.Group.findCheckboxesFunction('" +
group.getForm().getMarkupId() + "','" + group.getInputName() + "')";
}
The generated JS will address HTML form which is attached to check group, but this element may be not a root form (which is rendered as 'div' instead of 'form' element). JS code CheckGroupSelector:js:34 "parentForm[groupName]" can be evaluated to 'undefined'. I think, that "group.getForm().getMarkupId()" should be replaced by "group.getForm().getRootForm().getMarkupId()".