0

Problem carriage return with tooltip

asked 2010-06-28 05:06:34 +0800

SHERKHAN gravatar image SHERKHAN
231 3

Hi all

I have a problem with the carriage return in tooltip.

My code :

return new ListitemRenderer() {

            @Override
            public void render(Listitem item, Object data) throws Exception {
                item.setValue(data);
                Listcell cell = new Listcell();
                item.appendChild(cell);
                Hbox box = new Hbox();
                cell.appendChild(box);

                        [...]

                 toolTip += fieldName + " : " + result + "\n" + "something";

                 Label label = new Label(extension);
                 label.setTooltiptext(toolTip);
                 box.appendChild(label);
            }
        };

And the "\n" is not interpreted...

Thanks for your help,

Regards,

SHERKHAN

delete flag offensive retag edit

19 Replies

Sort by ยป oldest newest

answered 2010-07-02 08:33:20 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

updated 2010-07-02 08:38:47 +0800

That's not the same!

I remember that at earlier times we have problems with the missing 'pageEncoding' key. Please try this:

<?page id="indexPage" title="wikitties" cacheable="false" language="xul/html" zscriptLanguage="Java"?>
<?meta content="text/html; charset=UTF-8" pageEncoding="UTF-8"?>
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit"?>

<window id="win" title="wik . . .


best
Stephan

link publish delete flag offensive edit

answered 2010-07-02 08:46:32 +0800

SHERKHAN gravatar image SHERKHAN
231 3

updated 2010-07-02 08:55:46 +0800

Hey Stephan you have good memory!

But I have a bad news : it doesn't work...

It must be a stupid mistake! It may can come from my web.xml?

best regards,

SHERKHAN

link publish delete flag offensive edit

answered 2010-07-02 11:36:06 +0800

rafaelmaas gravatar image rafaelmaas
51

Hi, i got the same problem.
When i use system.out.println(myString) i got the "\n" but in ZK dont.
someone?

link publish delete flag offensive edit

answered 2010-07-02 12:18:36 +0800

rafaelmaas gravatar image rafaelmaas
51

i dont know why but status = status.concat(lista.get(i).getStatus()+" "+"\n"); work o.O

link publish delete flag offensive edit

answered 2010-07-05 03:12:02 +0800

SHERKHAN gravatar image SHERKHAN
231 3

Hi rafael!

I would like your example works but it doesn't...

Thanks for your help,

Best regards,

SHERKHAN

link publish delete flag offensive edit

answered 2013-09-11 12:03:45 +0800

cocoes gravatar image cocoes flag of Spain
94 6

Hi,

It's an old problem, but for new ones, since zk5.0.0, I've seen that you must use Label's property multiline=true in order to accept "\n" carriage returns .

Regards.

link publish delete flag offensive edit

answered 2014-08-03 10:30:49 +0800

odranoel75 gravatar image odranoel75
12

Hello, I knoew this is an old problem, but the solution I found was to escape the xml code by using

link publish delete flag offensive edit

answered 2018-12-13 15:36:30 +0800

xsulix gravatar image xsulix
10 1

Hi, this is enclosed en HTML text, so you have to put
instead of \n

Best regards

link publish delete flag offensive edit

answered 2018-12-13 15:38:24 +0800

xsulix gravatar image xsulix
10 1

Hi

This is enclosed in HTML component (not Java), so you have to put
instead of \n

Best regards

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
2 followers

RSS

Stats

Asked: 2010-06-28 05:06:34 +0800

Seen: 1,130 times

Last updated: Dec 13 '18

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More