Tuesday, November 30, 2010

Re: MVP *without* UiBinder

> gain, if anyone can summarize the necessary alternatives to the
> UiBinder content in MVP it would be a huge help.

You do everything the same, your presenter doesn't change, your
view/display interface doesn't change, you just create and wire your
widgets together manually in your view implementation. E.g.:

class MyView implements MyDisplay {
private FlowPanel p = new FlowPanel();
private TextBox a = new TextBox();
private Textbox b = new TextBox();

public MyView() {
// do manual layout here
p.add(a);
p.add(b);
}

public IsWidget asWidget() { return p; }

public HasText a() { return a; }

public HasText b() { return b; }
}

Your presenter then gets the MyDisplay implementation however
it would otherwise with a uibinder impl, pokes at it with the
a() and b() display interface methods, and is none the wiser
that you did/did not use uibinder in the view.

- Stpehen

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment