parsed.getKey().getEvents().isEmpty()
? StringUtils.EMPTY : parsed.getKey().getEvents().iterator().next(),
parsed.getValue());
custom.setModelObject(StringUtils.EMPTY);
send(LoggerCategoryPanel.this.getPage(), Broadcast.BREADTH, new EventSelectionChanged(
target,
Collections.<String>singleton(eventString),
Collections.<String>emptySet()));
target.add(categoryContainer);
}
}
}, ActionLink.ActionType.CREATE, pageId, true);
actionPanel.add(new ActionLink() {
private static final long serialVersionUID = -3722207913631435502L;
@Override
public void onClick(AjaxRequestTarget target) {
if (StringUtils.isNotBlank(custom.getModelObject())) {
final Map.Entry<EventCategoryTO, AuditElements.Result> parsed =
LoggerEventUtils.parseEventCategory(custom.getModelObject());
final String eventString = LoggerEventUtils.buildEvent(
parsed.getKey().getType(),
null,
null,
parsed.getKey().getEvents().isEmpty()
? StringUtils.EMPTY : parsed.getKey().getEvents().iterator().next(),
parsed.getValue());
custom.setModelObject(StringUtils.EMPTY);
send(LoggerCategoryPanel.this.getPage(), Broadcast.BREADTH, new EventSelectionChanged(
target,
Collections.<String>emptySet(),
Collections.<String>singleton(eventString)));
target.add(categoryContainer);
}