UiBinder multi-line tool tip not possible?

124 views
Skip to first unread message

Patrick Tucker

unread,
Jun 10, 2011, 9:41:23 AM6/10/11
to Google Web Toolkit
I'm trying to set the title on an element in UiBinder with a carriage
return or line feed in it, which is valid in JavaScript.

For example, the following code works:
element.setTitle("Line 1.\r\nLine2.");

When I put the same text into the title attribute in a UiBinder
element, the text is written exactally as seen, on the same line.

How do we go about displaying a multi-line tool tip in UiBinder?

Thanks,
Pat

Thomas Broyer

unread,
Jun 10, 2011, 11:25:51 AM6/10/11
to google-we...@googlegroups.com
"\r\n" is a notation to write these otherwise-forbidden-in-a-Java-String-literal chars. UiBinder is XML, so you need a similar notation for XML: 
 should do it (but maybe just using a CRLF in your XML would do it actually).

Disclaimer: this is theory, I didn't tried it.

Patrick Tucker

unread,
Jun 10, 2011, 3:54:17 PM6/10/11
to Google Web Toolkit
I had tried the escape for both of them, unfortunately the compiler
doesn't like them and errors. Sorry, I should have mentioned it in
the original post.

[ERROR] Line 32: String literal is not properly closed by a double-
quote

I'm assuming it converts them to an actual carriage return or line
feed when they should be converted to something else.

Thanks for your response,
Pat

Thomas Broyer

unread,
Jun 10, 2011, 9:37:27 PM6/10/11
to google-we...@googlegroups.com
You should (IMO) file a bug in the issue tracker then: http://code.google.com/p/google-web-toolkit/issues/entry

Patrick Tucker

unread,
Jun 16, 2011, 11:41:05 AM6/16/11
to Google Web Toolkit
If anyone cares to rate it up here is a link to the issue:
http://code.google.com/p/google-web-toolkit/issues/detail?id=6478
Reply all
Reply to author
Forward
0 new messages