GWT Editor: How to set last modified time on the entity when saved?
- by Mike
Suppose at client side i have an Entity proxy to edit by the UI and when i click save button, the last modified time is save in the entity as a field.
//start
MyEntityProxy proxy = getProxy();//fetched from server
Request<Void> saveRequest = requestFact.myEntityProxyRequest().save(proxy);
editorDriver.edit(proxy, saveRequest.getRequestContext());
editorDriver.flush();
//user modifies UI
....
//save
editorDriver.flush();
saveRequest.fire();
The problem is, where to insert the proxy.setLastModifiedTime(data) call? I always got
java.lang.IllegalStateException: The AutoBean has been frozen.
Thanks.