* we also return an online instance
* TODO: We should add the ability to load this via rest to enable associations
*/
String modelInstanceString = "";
if (this.entityId != null || entityKey != null) {
ModelInstance modelInstance = this.entityId != null
? apm.getModelInstance(this.extConfig, this.entityId)
: apm.getModelInstance(this.extConfig, this.entityKey, this.entityValue);
// ModelInstance modelInstance = this.entityId != null
// ? new ModelInstance(extConfig, this.entityId)
// : new ModelInstance(extConfig, this.entityKey, this.entityValue);
modelInstanceString = "Ext.ns('" + namespace + ".instance');" + "\n" +
namespace + ".instance." + this.extConfig.getModelName() + "=Ext.create('" +
fullModelName + "', " +
StringUtilities.json(modelInstance.getData(), this.request.getServletContext()) + ");\n";
}
StringBuffer javascript = new StringBuffer();
if (!configComponent.isWritten()) {