changing an entity proxy within request in GWT editor framework

110 views
Skip to first unread message

Human izatara

unread,
Jun 26, 2012, 8:48:23 AM6/26/12
to google-we...@googlegroups.com

I try to build an application based on spring-roo generated GWT code. now I want to do this scenario.

class Foo{
    List<Bar> barList;
}
class Bar{
    Foo foo;
}

and barList is owned entity collection for Foo, that means Bars will be saved in Foo crud scenario. but foo link in Bar is not set automatically and I got a constraint violation.

I want to find best place for setting foo link in each newly created Bar. where can I create such link in an application with spring roo gwt application architecture like or generally in an mvp gwt application which used editor framework and request factory?

Daniel Mauricio Patino León

unread,
Jun 26, 2012, 11:16:30 AM6/26/12
to google-we...@googlegroups.com
In this scenario i think you are using a ListEditor 

What i do is this:

From your editor when you create your new EntityProxy pass it to the ListEditor of Bar implementing TakesValue<V>

then when you create a new EntityProxy of Bar set it as if you are working on the server side with bar.setFoo(foo);

The RF on the server side will populate the relationship for you.

That's all a client only side approach for this scenario.



2012/6/26 Human izatara <iza...@gmail.com>

--
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/-/XTBto4o43k4J.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.



--
ISC. Daniel Mauricio Patiño León.
Director ejecutivo
Liondev S.A. de C.V.



Reply all
Reply to author
Forward
0 new messages