yes this could be a solution, on the other hand I am just finished
exploring the svn repository for the SuggestBox class:

the class we are using r3877

http://code.google.com/p/google-web-toolkit/source/browse/trunk/user/src/com/google/gwt/user/client/ui/SuggestBox.java?r=3877

is declared final, but all subsequent releases are not... so I am
going to sort out the problem installing gwt via svn and extending
SuggestBox

thanks to everybody for the help
Edoardo

On Dec 22, 10:51 am, eggsy84 <[email protected]> wrote:
> Hi there,
>
> (Just read your post on my tutorial)
>
> As you can't override the class the only way I can think of storing
> the data is to persist a collection of Strings so when the selection
> is made is made do something like this:
>
> ---
>
> onSuggestionSelected()
> {
>    myStringCollection.add(selectedSuggestion);
>
> }
>
> StringBuffer buffer = new StringBuffer();
> for ( String selection : myStringCollection )
> {
>    // just add a space between each item in the collection
>    buffer.append(selection + " ");
>
> }
>
> myTextArea.setText(buffer.toString());
>
> ---
>
> The String collection will hang around as long as the object hangs
> around?! Would that solve the problem?
>
> Eggsy
>
> On Dec 22, 8:40 am, Eddy <[email protected]> wrote:
>
> > Yes, I thought about that but unfortunately SuggestBox class was
> > declared final ...
>
> > On Dec 22, 4:55 am, "[email protected]" <[email protected]>
> > wrote:
>
> > > Create your own class which extends SuggestBox. Override the setText
> > > (String text) method with you own implementation.
>
> > > On Dec 21, 5:37 pm, Eddy <[email protected]> wrote:
>
> > > > If I create a SuggestBox based on a textarea, like this:
>
> > > > new SuggestBox(myoracle, new TextArea());
>
> > > > is there a way to make sure the suggestbox doesn't do a setText on the
> > > > whole textarea everytime a suggestion is selected?
>
> > > > any help appreciated
> > > > thanks
--~--~---------~--~----~------------~-------~--~----~
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