This is something I'm really interested in as well Stephen.
-
How do you test these things? How does the next guy know
whether his event handler belongs in the view or the controller?
-
If the event doesn't change the view state, it doesn't belong in the
view. I would argue that clicking
How do you test these things?
This gwt-hack example project is horribly unmaintained, but the idea is:
http://github.com/stephenh/gwt-hack/blob/master/src/test/java/com/bizo/gwthack/client/presenters/ClientPresenterTest.java
When GwtFooView is generated, so is StubFooView, which has fields
For context, this is what Zach is implementing:
My team has been struggling a bit to find a way to handle
interactions between controllers and views smoothly. We've ended up
with a lot of code in one of two styles:
class FooController {
void onFirstRender {
Putting the patch aside for a moment, I think the Wave team solved this
problem best: allow the view to have knowledge of its controller, but in
its own terms, via a delegate interface that the view defines. The
little bit of code you wind up with in most views becomes a semantic
passthrough to
I agree that we need a more general low-labor way to bind events in a
GWT app, but this doesn't seem to be it. Am I missing something?
It's not necessarily related to events, but I've been pleased with the
low-labor aspect of generating views:
http://gwtmpv.org/viewgeneration.html
My
It may be a day or two before I can take this review, Zach. Sorry for the
delay.
On Fri, Sep 24, 2010 at 5:49 PM, zac...@gmail.com wrote:
Reviewers: rjrjr,
Description:
Add a ControllerBinder in UiBinder so that UiHandlers can be bound on
both the
controller and the view. This allows views