String className = (String) data.get("elementName");
String q = (String) data.get("qualifier");
String viewPath = (String) data.get("viewPath");
String method = (String) data.get("method");
ModelElement parentElement = (ModelElement) sourceModule;
if (qualifier != null) {
parentElement = new ControllerType(parentElement, qualifier,
Modifiers.AccNameSpace, 0, 0, 0, 0, null, doc);
return new TemplateField(parentElement, elementName, q, className, viewPath, method);
}
} else if (type.equals("scalar")) {
JSONObject data = JsonUtils.getScalar(metadata);
String className = (String) data.get("elementName");
String viewPath = (String) data.get("viewPath");
String method = (String) data.get("method");
ModelElement parentElement = (ModelElement) sourceModule;
return new TemplateField(parentElement, elementName, null, className, viewPath, method);
}
} catch (Exception e) {
Logger.logException(e);