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