Re: Does SuggestBox.setOracle(SuggestOracle) have to be private?
I use a delegate pattern to do this very thing. Its really the only way to keep presenter logic where it belongs without polluting your namespace with widgets. The SuggestBox is none the wiser. Just make sure your delegator handles the base case where its delegate oracle is null, of course, otherwise explosions aplenty. -Ben On Jan 6, 10:56 am, Patrick Tucker wrote: > Thats a good idea, I will look into doing that instead. > > The SuggestBox isn't going to have any problems with the SuggestOracle > being changed even though, if implemented this way, it doesn't know it > is being changed? > > Thanks again, > Pat > > On Jan 6, 11:46 am, Thomas Broyer wrote: > > > How about having a SuggestOracle that simply delegates to another > > SuggestOracle, and on which one you can swap the delegate? So, instead of > > suggestBox.setOracle(...), you'd call mySwappableOracle.setOracle(...) -- 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-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Does SuggestBox.setOracle(SuggestOracle) have to be private?
Thats a good idea, I will look into doing that instead. The SuggestBox isn't going to have any problems with the SuggestOracle being changed even though, if implemented this way, it doesn't know it is being changed? Thanks again, Pat On Jan 6, 11:46 am, Thomas Broyer wrote: > How about having a SuggestOracle that simply delegates to another > SuggestOracle, and on which one you can swap the delegate? So, instead of > suggestBox.setOracle(...), you'd call mySwappableOracle.setOracle(...) -- 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-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Does SuggestBox.setOracle(SuggestOracle) have to be private?
I have a form that depending upon a listbox value that the user selects needs different suggestions. Currently I have 1 SuggestOracle and I have to clear it and reload it, with values from the server, every time the user changes the ListBox. What I would like to do is store a SuggestOracle for each value and swap the oracle out every time the user changes the ListBox value. If I was to modify the SuggestBox code in my project to make setOracle public would there be any negative reprocussions? Thanks, Pat -- 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-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.