neo09 / gwt-platform

Automatically exported from code.google.com/p/gwt-platform
0 stars 0 forks source link

Allow singleton presenters to be bound to non-singleton views #93

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Binding many presenters to the same view class can be useful in some cases. 
For example, a `create` page and an `edit` page could be exactly the same 
save for the underlying logic.

Right now, presenters are bound to singleton views, which makes it hard to 
cleanly do the above. Allowing presenters to be bound to non-singleton 
views would make this possible.

We should build a mechanism in AbstractPresenterModule to allow this. For 
example, say we wanted to bind Presenter1 and Presenter2 to different 
instances of View1, we could do:

   bindPresenter( Presenter1, Presenter1.MyProxy );
   bindPresenter( Presenter2, Presenter2.MyProxy );
   bindView( SharedViewInterface, View1 );

Original issue reported on code.google.com by philippe.beaudoin on 15 May 2010 at 3:20

GoogleCodeExporter commented 9 years ago
The example here are missing the ".class"

Also, the last method should be called:
   bindSharedView()
To clearly highlight that it's not the standard use case.

Original comment by philippe.beaudoin on 15 May 2010 at 3:42

GoogleCodeExporter commented 9 years ago
This proposition is discussed in this thread:
http://groups.google.com/group/gwt-platform/browse_thread/thread/b479694d19501ad
9

Original comment by philippe.beaudoin on 15 May 2010 at 3:43

GoogleCodeExporter commented 9 years ago

Original comment by philippe.beaudoin on 28 May 2010 at 6:54