关于视图引起的错误

我在实体编辑页面的控制器中希望使用getEditedEntity()。

import com.alibaba.fastjson.JSON;
String jsonString = JSON.toJSONString(getEditedEntity());

使用时报出以下两个错误。

IllegalStateException: Cannot get unfetched attribute [createTs] from detached object com.test.sysmanager.entity.EcoSys-53d8cc00-dc82-cfa9-354f-ca7aef494bc6 [detached].

Caused by: com.alibaba.fastjson.JSONException: write javaBean error, fastjson version 1.2.58, class com.test.sysmanager.entity.EcoSys, method : getCreateTs

于是我自己创建了一个包括系统属性的视图

<view entity="sysmanager_EcoSys"
      name="my-view"
      extends="_local" systemProperties="true"/>

并在编辑页面里使用了它

<data>
    <instance id="ecoSysDc" 
              class="com.test.sysmanager.entity.EcoSys"
              view="my-view">
        <loader/>
    </instance>
</data>

但是仍然会出现以上的错误

编辑界面是怎么打开的?如果是从浏览界面打开的话,需要修改浏览界面的视图。因为实体是从浏览界面传过去的。

明白了,谢谢