updateEventsContainer(change.getTarget());
} else if (event.getPayload() instanceof InspectSelectedEvent) {
// update objects ....
eventCategoryTO.getEvents().clear();
final InspectSelectedEvent inspectSelectedEvent = (InspectSelectedEvent) event.getPayload();
final Map.Entry<EventCategoryTO, AuditElements.Result> categoryEvent =
LoggerEventUtils.parseEventCategory(inspectSelectedEvent.getEvent());
eventCategoryTO.setType(categoryEvent.getKey().getType());
category.setChoices(filter(eventCategoryTOs, type.getModelObject()));
eventCategoryTO.setCategory(categoryEvent.getKey().getCategory());
subcategory.setChoices(filter(eventCategoryTOs, type.getModelObject(), category.getModelObject()));
eventCategoryTO.setSubcategory(categoryEvent.getKey().getSubcategory());
if (categoryEvent.getKey().getType() == EventCategoryType.CUSTOM) {
custom.setModelObject(LoggerEventUtils.buildEvent(
categoryEvent.getKey().getType(),
categoryEvent.getKey().getCategory(),
categoryEvent.getKey().getSubcategory(),
categoryEvent.getKey().getEvents().isEmpty()
? StringUtils.EMPTY : categoryEvent.getKey().getEvents().iterator().next(),
categoryEvent.getValue()));
category.setEnabled(false);
subcategory.setEnabled(false);
custom.setVisible(true);
custom.setEnabled(true);
actionPanel.setVisible(true);
actionPanel.setEnabled(true);
} else {
category.setEnabled(true);
subcategory.setEnabled(true);
custom.setVisible(false);
custom.setEnabled(false);
actionPanel.setVisible(false);
actionPanel.setEnabled(false);
}
inspectSelectedEvent.getTarget().add(categoryContainer);
updateEventsContainer(inspectSelectedEvent.getTarget());
}
}