Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » RAP Textfield problem
RAP Textfield problem [message #1016224] Tue, 05 March 2013 14:43 Go to next message
Jens L is currently offline Jens LFriend
Messages: 2
Registered: March 2013
Junior Member
i have the following simple Textfield

Text password = new Text( compInput, SWT.BORDER | SWT.PASSWORD);


i saved the value of these textfield in an ClientStore for the next start.

 ClientStore store = RWT.getClient().getService(ClientStore.class);
    
 String passwordValue = store.get("Password");

 passwort.setText(passwordValue);


My problem is that the method setText() from Text class is being called two times. And after these two calls the length from textfield getting greater.

For example:

Value for textfield after first call of setText(): "password"

Value for textfield after second call of setText(): "password "

I debuged this problem and find the following:

in class ClientMessage (Version RAP 2.0 R) i became at line 217 the following JSONObject during the second call of the setText() method:

{"text":"password\u200b","selectionStart":0,"selectionLength":0}


My question is why is the character with the Unicode \u200b in the text parameter and why is the method setText two times call ?

Re: RAP Textfield problem [message #1016618 is a reply to message #1016224] Thu, 07 March 2013 07:40 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi Jens,
the character \u200b is 'zero width space' character. What Tabris
platform are you using - Android or iOS?
Best,
Ivan


On 3/7/2013 4:19 AM, Jens Lauble wrote:
> i have the following simple Textfield
>
> Text password = new Text( compInput, SWT.BORDER | SWT.PASSWORD);
>
> i saved the value of these textfield in an ClientStore for the next
> start.
>
>
> ClientStore store = RWT.getClient().getService(ClientStore.class);
> String passwordValue = store.get("Password");
>
> passwort.setText(passwordValue);
>
> My problem is that the method setText() from Text class is being
> called two times. And after these two calls the length from textfield
> getting greater.
> For example:
>
> Value for textfield after first call of setText(): "password"
>
> Value for textfield after second call of setText(): "password "
>
> I debuged this problem and find the following:
>
> in class ClientMessage (Version RAP 2.0 R) i became at line 217 the
> following JSONObject during the second call of the setText() method:
>
> {"text":"password\u200b","selectionStart":0,"selectionLength":0}
>
> My question is why is the character with the Unicode \u200b in the
> text parameter and why is the method setText two times call ?
>
>

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: RAP Textfield problem [message #1016626 is a reply to message #1016618] Thu, 07 March 2013 08:19 Go to previous messageGo to next message
Jens L is currently offline Jens LFriend
Messages: 2
Registered: March 2013
Junior Member
I use both platforms but the problem only occur on the android platform
Re: RAP Textfield problem [message #1016639 is a reply to message #1016224] Thu, 07 March 2013 08:46 Go to previous message
Moritz Post is currently offline Moritz PostFriend
Messages: 1
Registered: July 2009
Junior Member
Hi. Thanks for raising your issue.

Regarding the empty space character in the text field: That is a known tabris android bug and will be fixed in the next release.

For your setText being called twice... The code you pasted should not get called twice so it has probably something to do with your code setup. More insights would be needed.

Btw... for direct feedback on tabris related questions you should use the tabris issue tracker on github.com/eclipsesource/tabris
Previous Topic:RAP File downloading
Next Topic:RAP 2.0 Tooltip on Table(Viewer) column header not working
Goto Forum:
  


Current Time: Mon May 06 12:00:11 GMT 2024

Powered by FUDForum. Page generated in 0.03579 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top