Me too:
I have the code below, which returns an existing pojo based on uid,
lessonUri criteria. When I try to modify 'response' I get
'java.lang.IllegalStateException: The AutoBean has been frozen'
thrown:
request.findUserLesson(777L, lessonUri).fire(new
Receiver<LessonProxy>() {
@Override
public void onSuccess(LessonProxy response) {
Lesson res = null;
if (response != null) {
res = create(requests, response);
}
cbk.onSuccess(res);
}
On Nov 9, 11:07 am, Tobias <[email protected]> wrote:
> Hello,
>
> I came across another problem. I have a page setup with various
> Editors, including a subclass ListEditor (for dealing with a
> CellTable). They accumulate changes into a RequestContext and it works
> fine now. I have a "Save Changes" button that fires the request, and
> now I would like to enable editing again, after the request has been
> successfully processed. I think I need to create a new RequestContext
> for that? Here is what I do in the onSuccess-Callback:
>
> context = requests.recipeRequest();
> this.recipe = context.edit(recipe);
> context.persist().using(this.recipe).with(driver.getPaths());
> driver.edit(this.recipe, context);
>
> The last one fails however, because setting a new List causes the
> ListEditor to detach from the old list, which causes a "flush", which
> in turn causes a value being written to one of the frozen AutoBeans
> from the original request. Is that a bug, or am I doing something
> wrong?
>
> Thanks,
> Tobias
>
> java.lang.IllegalStateException: The AutoBean has been frozen
> at
> com.google.gwt.editor.client.impl.AbstractAutoBean.checkFrozen(AbstractAuto
> Bean.java:
> 176)
> at
> com.google.code.lunchpad.client.proxy.IngredientProxyAutoBean.access
> $6(IngredientProxyAutoBean.java:1)
> at com.google.code.lunchpad.client.proxy.IngredientProxyAutoBean
> $1.setText(IngredientProxyAutoBean.java:19)
> at
> com.google.code.lunchpad.client.recipes.IngredientEditor_RequestFactoryEdit
> orDelegate.flushSubEditors(IngredientEditor_RequestFactoryEditorDelegate.ja
> va:
> 18)
> at
> com.google.gwt.editor.client.impl.AbstractEditorDelegate.flush(AbstractEdit
> orDelegate.java:
> 144)
> at com.google.gwt.editor.client.impl.AbstractEditorDelegate
> $Chain.detach(AbstractEditorDelegate.java:75)
> at
> com.google.gwt.editor.client.adapters.ListEditorWrapper.detach(ListEditorWr
> apper.java:
> 101)
> at
> com.google.gwt.editor.client.adapters.ListEditor.setValue(ListEditor.java:
> 129)
> at
> com.google.code.lunchpad.client.recipes.IngredientListEditor.setValue(Ingre
> dientListEditor.java:
> 50)
> at
> com.google.gwt.editor.client.adapters.ListEditor.setValue(ListEditor.java:
> 1)
> at
> com.google.gwt.editor.client.impl.AbstractEditorDelegate.initialize(Abstrac
> tEditorDelegate.java:
> 257)
> at
> com.google.gwt.requestfactory.client.impl.RequestFactoryEditorDelegate.init
> ialize(RequestFactoryEditorDelegate.java:
> 83)
> at
> com.google.code.lunchpad.client.recipes.edit.EditRecipeView_RequestFactoryE
> ditorDelegate.attachSubEditors(EditRecipeView_RequestFactoryEditorDelegate.
> java:
> 15)
> at
> com.google.gwt.editor.client.impl.AbstractEditorDelegate.initialize(Abstrac
> tEditorDelegate.java:
> 261)
> at
> com.google.gwt.requestfactory.client.impl.RequestFactoryEditorDelegate.init
> ialize(RequestFactoryEditorDelegate.java:
> 83)
> at
> com.google.gwt.requestfactory.client.impl.AbstractRequestFactoryEditorDrive
> r.edit(AbstractRequestFactoryEditorDriver.java:
> 67)
> at
> com.google.code.lunchpad.client.recipes.edit.EditRecipeActivity.edit(EditRe
> cipeActivity.java:
> 79)
> at
> com.google.code.lunchpad.client.recipes.edit.EditRecipeActivity.access
> $0(EditRecipeActivity.java:75)
> at com.google.code.lunchpad.client.recipes.edit.EditRecipeActivity
> $2.onSuccess(EditRecipeActivity.java:110)
> at com.google.code.lunchpad.client.recipes.edit.EditRecipeActivity
> $2.onSuccess(EditRecipeActivity.java:1)
> at com.google.gwt.requestfactory.client.impl.AbstractRequestContext
> $4.onTransportSuccess(AbstractRequestContext.java:394)
> at com.google.gwt.requestfactory.client.DefaultRequestTransport
> $1.onResponseReceived(DefaultRequestTransport.java:155)
> at
> com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:
> 287)
> at com.google.gwt.http.client.RequestBuilder
> $1.onReadyStateChange(RequestBuilder.java:395)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
> 39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
> l.java:
> 25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
> at
> com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
> at
> com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.jav a:
> 157)
> at
> com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingFo
> rReturn(BrowserChannelServer.java:
> 326)
> at
> com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChann
> elServer.java:
> 207)
> at
> com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:
> 126)
> at
> com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:
> 561)
> at
> com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:
> 269)
> at
> com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.j
> ava:
> 91)
> at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
> at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:214)
> at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
> l.java:
> 25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at
> com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
> at
> com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
> at
> com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.jav a:
> 157)
> at
> com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChanne
> lServer.java:
> 281)
> at
> com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChan
> nelServer.java:
> 531)
> at
> com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java :
> 352)
> at java.lang.Thread.run(Thread.java:662)
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.