|
|
@@ -47,7 +47,6 @@ public class DynPageSaveHandler extends AbstractDynPageHandler { |
|
|
|
//对应的数据集定义 |
|
|
|
PageDataset pageDataSet = findDataset(dbName); |
|
|
|
if (pageDataSet == null) throw new BizException("没有找到指定的的数据集定义:" + dbName + "!"); |
|
|
|
ModelTable table = ModelTableCache.getInstance().get(pageDataSet.masterTable); |
|
|
|
|
|
|
|
//读取待保存的bean |
|
|
|
DefaultEntity bean = readBeanFromPage(pageDataSet, data.readMap("form")); |
|
|
@@ -150,8 +149,8 @@ public class DynPageSaveHandler extends AbstractDynPageHandler { |
|
|
|
ModelTable table = ModelTableCache.getInstance().get(pageDataSet.masterTable); |
|
|
|
if (table == null) throw new BizException("没有找到待保存的表定义:" + pageDataSet.name); |
|
|
|
|
|
|
|
long id = params.readLong(table.getIdField()); |
|
|
|
boolean isNew = params.readBool(DefaultEntity.statusKey) || id <= 0L; |
|
|
|
long id = data.readLong(table.getIdField()); |
|
|
|
boolean isNew = data.readBool(DefaultEntity.statusKey) || id <= 0L; |
|
|
|
|
|
|
|
EntityDao<DefaultEntity> dao = DbEngine.getInstance().findDao(table.getName()); |
|
|
|
DefaultEntity bean; |
|
|
|