@SuppressWarnings("serial")
private void addCheckBox(final DivPanel checkBoxDivPanel, final ICalendarFilter filter, final String property,
final String labelKey,
final String tooltipKey, final boolean autoSubmit)
{
final CheckBoxButton checkBoxButton = new CheckBoxButton(checkBoxDivPanel.newChildId(),
new PropertyModel<Boolean>(filter, property),
checkBoxDivPanel.getString(labelKey), autoSubmit);
if (autoSubmit == false) {
checkBoxButton.getCheckBox().add(new OnChangeAjaxBehavior()
{
@Override
protected void onUpdate(final AjaxRequestTarget target)
{
}
});
}
if (tooltipKey != null) {
checkBoxButton.setTooltip(checkBoxDivPanel.getString(tooltipKey));
}
checkBoxDivPanel.add(checkBoxButton);
}