I have a ValueProxy which references an EntityProxy to add some data
to return to the client, in this case a child count for the current
branch in a tree structure.  I want properties reference from the
EntityProxy, but only one Entity seems to have the getter on my domain
object called.

ValueProxy that gets returned directly from RequestContext:

@ExtraTypes(value = {
        MyEntitySizeProxy.class
}) @ProxyFor(value = MyEntitySizeList.class) public interface
MyEntitySizeListProxy extends ListLoadResultProxy<MyEntitySizeProxy>,
ValueProxy {

        @Override List<MyEntitySizeProxy> getData();

        @Override void setData(List<MyEntitySizeProxy> data);
}

ValueProxy inside that contains the added data and my EntityProxy:

@ProxyFor(locator = MyLocator.class, value = MyEntitySize.class)
public interface MyEntitySizeProxy extends ValueProxy, BeanModelTag /
*BeanModelTag is from GXT*/ {

        int getChildCount();

        MyEntityProxy getEntity();

        void setChildCount(int childCount);

        void setEntity(MyEntityProxy entity);
}

@com.google.web.bindery.requestfactory.shared.ProxyForName(value=MyEntity.class,
locator=MyLocator.class) public interface MyEntityProxy extends
com.google.web.bindery.requestfactory.shared.EntityProxy,
com.extjs.gxt.ui.client.data.BeanModelTag {

        OtherEntityProxy getOther();
}


In this case, I'm doing a .with("data.entity.other"), but only the
last one in the list is getting other populated.  Any non-references
in MyEntityProxy seem to get populated.  If I just return a
List<MyEntitySizeProxy> from my RequestContext, it also does the same
thing.


I don't seem to have this problem when it's just a single ValueProxy
to an EntityProxy or list of EntityProxies:
public interface PagingMyEntityResultProxy extends
com.google.web.bindery.requestfactory.shared.ValueProxy,
PagingListLoadResultProxy<MyEntityProxy> {
        @Override public java.util.List<MyEntityProxy> getData();
        @Override public void setData(java.util.List<MyEntityProxy> data);
        @Override public int getOffset();
        @Override public void setOffset(int offset);
        @Override public int getTotalLength();
        @Override public void setTotalLength(int totalLength);
}

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to