use of com.opensymphony.xwork2.util.CompoundRoot in project onebusaway-application-modules by camsys.
the class MessageComponent method end.
@Override
public boolean end(Writer writer, String body) {
if (_key != null) {
ValueStack stack = getStack();
CompoundRoot root = stack.getRoot();
TextProvider textProvider = null;
for (Object obj : root) {
if (obj instanceof TextProvider) {
textProvider = (TextProvider) obj;
break;
}
}
if (textProvider != null) {
String message = textProvider.getText(_key, _arguments);
if (message != null) {
try {
writer.write(message);
} catch (IOException e) {
LOG.error("Could not write out tag", e);
}
}
}
}
return super.end(writer, "");
}
Aggregations