Another option is to create a SuggestOracle subclass that delegates method calls to another object (perhaps another oracle). Make the first oracle have get/set methods to set the delegatee.
FKereki wrote: > If I understand it correctly, that poses a chicken-and-egg problem, > because the Presenter constructor requires a View, and the View > constructor would require something created by the Presenter? With > MVP, I first create a View, and then inject it into the Presenter. If > the View requires an oracle, then I must create the Presenter first -- > but in that case I cannot inject the View!? > > I solved this --and am not happy about it-- by (1st) creating the > View, WITHOUT the SuggestBox, (2nd) injecting the View into the > Presenter, and (3rd) having the Presenter create the oracle and > provide it to the View, so the latter can add the missing SuggestBox. > While this does work, it goes against UiBinder; the best I can do is > to reserve a space for the SuggestBox, and I cannot get to use > @UiHandler annotations. > > -- 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.
