RequestFactory 2.4: save entities with multiple sub entities, can only get the first one at server side.

Skip to first unread message


May 29, 2012, 1:02:08 AM5/29/12
I'm using GWT requestFactory to save an entity, the code is rather simple: i want to create a Blog entity with several Tags, here is my code:

client side:

         BlogRequest blogRequest = factory.blogRequest();
        BlogProxy  instance  = blogRequest.create(  BlogProxy .class );

        instance.setName( "blog name");
        instance.setNote( "mynote2" );
        instance.setTags( base.createTagProxies( blogRequest, tag ) ); instance ).fire(...);

    public Set<TagProxy> createTagProxies( BlogRequest request, String... tagNames )
        Set<TagProxy> tagproxies = new HashSet<TagProxy>();
        for( String tagName : tagNames )
            TagProxy proxy = request.create( TagProxy.class );
            proxy.setName( tagName );
            tagproxies.add( proxy );
        return  tagproxies  ;

for example i create a blog with "Tag1" and "Tag2" in a Set, however after the request send to server side, at Blog#setTags(Set<Tag> tags) method there is only one tag in the parameter set, which is "Tag1", "Tag2" is just missing.

Could anybody help with this issue? Thanks in advance.

Thomas Broyer

May 29, 2012, 1:50:40 AM5/29/12
There are unfortunately many small but annoying issues with RF in 2.4; most of them will be fixed in 2.5, to be released in a month or so.
Have a look at the issue tracker, I seem to recall having worked on patches for issues with ValueProxies and Sets (assuming TagProxy is a ValueProxy).

Ashwin Desikan

May 29, 2012, 2:04:28 AM5/29/12
Additionally, try using List instead of Set. It works for me when I faced similar issues. Only problem would be you will have to manage any redundancy with List


Sent from my iPhone
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To view this discussion on the web visit
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

July G

May 29, 2012, 2:58:01 AM5/29/12
Thank you guys, i changed to List and it works. 
BTW before i use EntityProxy in Set which lead to error, other than ValueProxy
Reply all
Reply to author
0 new messages