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 " "?

OptionElement.java:
/**
* 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 google-web-toolkit+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-web-toolkit/43cc9fcd-bc73-4f07-b9f3-ac6ed7fbfdddn%40googlegroups.com.

No comments:

Post a Comment