Hi! I was facing the same issue. I've found out this, but I'm open to any suggestion:
I've put Driver in the Activity, because View should be responsible only for display (but using editor.flush() method is responsible for Model changes -- it should go to the Presenter layer (Activity in this perspective)). Because Driver needs a class with the right properties, you can't let View implement the Editor, because it's simply not working (I've tried). I've made a seperate Editor widget (with UiBinder), which is included in the View, and I've made a getEditor(); method in the View interface, so Presenter can get the Editor from the View. My only problem, that I have to make an other Composite for the Editor, but it would be great to include it in the View, but I couldn't. Any advice are welcome, maybe there is a better solution. On Thu, Jan 20, 2011 at 6:41 PM, Patrice De Saint Steban < patou.de.saint.ste...@gmail.com> wrote: > Hello, > > I want to have the best practice to know how to use the Editor Framework > with MVP. Where place all the code. > For exemple if I want to do a build an Activity with edit an object, I > will create first an Activity EditObjectActivity and a EditObjectView > interface with the EditObjectViewImpl that use the UiBinder. > The first think is to load the object to edit with RequestFactory. I put > this code in the start method in the Activity. > After I must create the Driver : > public interface Driver extends RequestFactoryEditorDriver<ObjectProxy, > EditObjectViewImpl> > { } > > The creation of the Driver > > driver = GWT.create(Driver.class); > driver.initialize(view); > > Bind the object and the persit request to the driver : > > objectRequest = clientFactory.getAppRequestFactory().objectRequest (); > driver.edit(object, objectRequest ); > > My Question, is where in the MVP put all these codes ? > > The Driver must be pameterized with a Proxy P and a class extend Editor<P>. > The Driver is in the Activity ? > The activity mustn't know the implementation of the View and the driver > must know it to generate the binding. > or the view must have all methode for all Editor implementation > > Or the Driver can be in the View ? > > Thank for the reply. > > -- > Patrice de Saint Stéban > Groupe SFEIR - France > > > -- > 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<google-web-toolkit%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. > -- Üdv, Kriván Bálint -- 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.