Closed GoogleCodeExporter closed 9 years ago
Bumping up, preparing for release 0.2.
Original comment by philippe.beaudoin
on 13 May 2010 at 9:49
In my sample app I had a reference to the presenter from within the views
without modifying
gwtp.
- My View interface has a Presenter sub-interface (not sure for the technical
term for
this). It defines methods that handle events, such as onSelect, onXXX and
onYYY.
- My Presenter implements the View's Presenter sub-interface.
- My ViewImpl is constructor injected with a provider of the presenter
sub-interface.
- My View's Presenter sub-interface is bound to my Presenter using bind().to();
- My ViewImpl has @UiHandler methods that handle events are then forward them
on to the
presenter using this.presenterProvider.get().onXXX()
gwtp could possibly automate the last 3 steps.
You can view the sample code here: http://code.google.com/r/brendanpdoherty-
breadcrumbs/source/browse/breadcrumbs/src/nz/co/doherty/gwtpbreadcrumbs/client/u
i/home/
Original comment by brendanp...@gmail.com
on 18 May 2010 at 2:47
Brendan's approach is simple enough, and I've been doing something similar in
my own application. Bottom line I believe it is best to leave that up to the
user, so GWTP will not be enforcing passing the presenter into the view.
Original comment by philippe.beaudoin
on 27 Jun 2010 at 6:31
We could at least document this pattern in a how to section with a simple
example.
Original comment by goudreau...@gmail.com
on 27 Jun 2010 at 7:11
I totally agree, I've added Issue 123 for this.
Original comment by philippe.beaudoin
on 28 Jun 2010 at 5:55
See Issue 164.
Original comment by philippe.beaudoin
on 10 Sep 2010 at 12:42
Original comment by philippe.beaudoin
on 10 Sep 2010 at 12:43
Original issue reported on code.google.com by
philippe.beaudoin
on 25 Apr 2010 at 6:42