I use this class for copying proxies across contexts. May be helpful in 
your case too:

/**
 * Convenience method to copy an entity proxy to another request context.
 * 
 * @author sowdri
 * 
 */
public class RequestFactoryUtils {

public static <T extends BaseProxy> T copy(Class<T> clazz, T proxy,
RequestContext context) {

T newProxy = context.create(clazz);

if (proxy != null) {

AutoBean<T> oldBean = AutoBeanUtils.getAutoBean(proxy);
AutoBean<T> newBean = AutoBeanUtils.getAutoBean(newProxy);
AutoBeanCodex.decodeInto(AutoBeanCodex.encode(oldBean), newBean);

// newBean.setFrozen(true);
newProxy = newBean.as();
}

context.edit(newProxy);

return newProxy;
}
}

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/66sRjJbFRp4J.
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