Object value;
if (ExmlUtils.isExmlNamespace(arrayItemNode.getNamespaceURI()) && Exmlc.EXML_OBJECT_NODE_NAME.equals(arrayItemNode.getLocalName())) {
value = parseExmlObjectNode(arrayItemNode);
} else {
String arrayItemClassName = createFullConfigClassNameFromNode(arrayItemNode);
ConfigClass configClass = getConfigClassByName(arrayItemClassName, arrayItemNode);
JsonObject arrayItemJsonObject = new JsonObject();
if (configClass.getType() == null) {
// Everything not a component, plugin or layout must be created immediately
// by using net.jangaroo.ext.create() with its configClass and the config:
arrayItemJsonObject.settingConfigClass(configClass.getFullName());
model.addImport(configClass.getFullName());
model.addImport(configClass.getComponentClassName());
model.addImport(JsonObject.NET_JANGAROO_EXT_CREATE);
} else {
if (arrayItemClassName.startsWith(EXT_CONFIG_PREFIX)) {
// Ext classes are always loaded. We can use the type string directly.
arrayItemJsonObject.set(configClass.getType().getExtTypeAttribute(), configClass.getTypeValue());
} else {
arrayItemJsonObject.settingWrapperClass(configClass.getFullName());
model.addImport(configClass.getFullName());
model.addImport(configClass.getComponentClassName());
}
}
fillModelAttributes(model, arrayItemJsonObject, arrayItemNode, configClass);
value = arrayItemJsonObject;