@Override
protected void onUpdate(final AjaxRequestTarget target)
{
final Boolean newSelection = checkBoxPanel.getCheckBox().getConvertedInput();
final TemplateCalendarProperties properties = activeTemplateEntry.getCalendarProperties(calendar.getId());
if (newSelection != properties.isVisible()) {
properties.setVisible(newSelection);
activeTemplateEntry.setDirty();
}
}
});
container.add(checkBoxPanel);
WicketUtils.addTooltip(checkBoxPanel.getCheckBox(), getString("plugins.teamcal.filterDialog.calendarIsVisible.tooltip"));
container.add(new Label("name", calendar.getTitle()));
final ColorPickerPanel picker = new ColorPickerPanel("colorPicker", activeTemplateEntry.getColorCode(calendar.getId())) {
@Override
protected void onColorUpdate(final String selectedColor)
{
final TemplateCalendarProperties props = activeTemplateEntry.getCalendarProperties(calendar.getId());
if (props != null) {
props.setColorCode(selectedColor);
} else {
log.warn("TeamCalendarProperties not found: calendar.id='"
+ calendar.getId()
+ "' + for active template '"
+ activeTemplateEntry.getName()