Sunday, December 27, 2020

Re: 2.9.0 ListBox getItemText(i) trims result [possible bug]

I think I found the reason. It's the JS Implementation of  OptionElement#setText.
It discards the last spaces in the string. I see that in debugger. 
Here method input parametr "String text" contains space symbol at the end. 
But after executing  the line "this.text = text;"
this.text contains string without space symbol at the end; 

So do I need to replace all leading and trailing white space characters with " "?
* The text contained within the option element.
public final native void setText(String text) /*-{
this.text = text;

пятница, 25 декабря 2020 г. в 16:11:54 UTC+4, Joker Joker:
I have an issue with GWT 2.9.0 ListBox#getItemText():

String name = listBox.getItemText(i);

The result is a string with extra spaces removed at the end.

Have anybody run into the same problem?

Browser - Chrome/Firefox(latest)

You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

No comments:

Post a Comment