GWT Editor: How to set last modified time on the entity when saved?
Posted
by
Mike
on Stack Overflow
See other posts from Stack Overflow
or by Mike
Published on 2012-11-23T04:57:08Z
Indexed on
2012/11/23
4:59 UTC
Read the original article
Hit count: 149
gwt
|gwt-editors
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.
© Stack Overflow or respective owner