if (Option.isEmpty(className)) {
actionData.inError = true;
String errMsg = "No class name attribute in <" + localName + ">";
getLogger().error(errMsg);
ec.addError(new ErrorItem(errMsg));
return;
}
try {
getLogger().debug(
"About to instantiate component <{}> of type [{}]", localName,
className);
actionData.nestedComponent = Loader.loadClass(className).newInstance();
getLogger().debug(
"Pushing component <{}> on top of the object stack.", localName);
ec.pushObject(actionData.nestedComponent);
} catch (Exception oops) {
actionData.inError = true;
String msg = "Could not create component <" + localName + ">.";
getLogger().error(msg, oops);
ec.addError(new ErrorItem(msg));
}
}