The way I was planning on handling this is allowing dependency
injection (GIN) to create the oracle and inject that into the view's
constructor.

On Dec 21, 7:03 am, FKereki <[email protected]> wrote:
> Hi! Trying to work with a SuggestBox field and MVP, I found a problem.
> You can getSuggestOracle(...) but you cannot set an oracle unless you
> do it through its constructor, and this asymmetry poses a problem.
>
> In MVP, the View shouldn't deal with the oracle complexity; its logic
> should be a Presenter responsibility, so the View cannot create the
> SuggestBox. On the other hand, since the Presenter shouldn't be
> creating widgets, there's a problem... who creates the widget?
>
> I think there should be a setSuggestOracle(...) method; thus, you
> could create an oracle-less widget (possibly via UiBinder) and later
> attach a Presenter-provided oracle to it.
>
> What do you think? Am I missing anything?

--

You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.


Reply via email to