@Override
public void onChanged(ChangedEvent event) {
if (event.getValue() != null) {
String selectedTemplateId = event.getValue().toString();
// user picked one of the canned expressions - update field values
CannedGroupExpression cge = cannedExpressions.get(selectedTemplateId);
if (cge != null) {
StringBuilder expr = new StringBuilder();
for (String e : cge.getExpression()) {
expr.append(e+"\n");
}
expression.setValue(expr.toString());
recalculationInterval.setValue(cge.getRecalcInMinutes());
description.setValue(cge.getDescription());
recursive.setValue(cge.isRecursive());
name.setValue(cge.getName());
}
else {
expression.setValue("");
}
} else {