Hello all,

I tried to reply to the message below in its own thread (here:
http://groups.google.com/group/google-web-toolkit/browse_thread/thread/4309e1e60f2cb8d8?pli=1
),
but I was getting an error at every attempt, so I decided to open a new
topic with the same title.

It seems this useful workaround doesn't work anymore.
I get a ClassCastException when I try it. My RequestContext implementation
is casted to AbstractRequestContext$State.
I can't find a way to access the state of a RequestContext in order to
attribute the new one to the old AutoBean. The attribute is private. It
almost seems somebody wanted to prevent this hack from being possible...

Is there any alternative now, besides manually copying each property of
each proxy?

Thank you for any help,
Tiago.

On Feb 22 2011, 9:41 pm, Scott Olcott <[email protected]> wrote:
> Thomas,
> You are correct in understanding my issue.  I tried
> calling AutoBean.clone(), but is fails with a "Cannot clone wrapped bean"
> error.
>
> I was however able to resubmit the proxy successfully using the following:
>
>            AutoBean<Test> autoBean = AutoBeanUtils.getAutoBean(test);
>
>         autoBean.setFrozen(false);
>
>         requestContext = requestFactory.testRequest();
>
>         autoBean.setTag("requestContext", requestContext);
>
>         driver.edit(test, requestContext);
>
> calling autoBean.setTag("requestContext", requestContext) is needed to
avoid
> a "Attempting to edit an EntityProxy previously edited by another
> RequestContext"  error.  I know it's a hack but it's the only thing I can
> get to work other than copying the proxy into a new proxy property by
> property.

-- 
Tiago Rinck Caveden

-- 
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.

Reply via email to