throw new TMLScriptException("Cannot use tmlform.storeInHDB() on form " + getformid() + " that is defined without attribute 'contentclass'");
}
params.setContentClass(contentClass);
// Get the model
HDBModel model = (HDBModel) targetContext.db().getAttribute(WGACore.DBATTRIB_HDBMODEL);
if (model == null) {
throw new TMLScriptException("Cannot use tmlform.storeInHDB() in database " + targetContext.db().getDbReference() + " where HDB model is not available");
}
// Create the content
try {
_createdDoc = model.createContent(params, gettargetcontext().content());
return true;
}
catch (WGHierarchicalDatabaseEventCanceledException e) {
addmessage(e.getMessage());
return false;