The following test shows the wrong tooltip popup for label l2.
<?xml version="1.0" encoding="UTF-8"?>
<window xmlns:html="http://www.w3.org/1999/xhtml">
<vbox>
<label id="l1" value="Label l1 - Hover here, should show Popup #1" />
<label id="l2" value="Label l2 - Hover here, should show Popup #2 - but shows #1" />
</vbox>
<zscript>
// bug in ZK 3.0.0
import org.zkoss.zul.*;
p = new Popup();
p.appendChild(new Html("Popup #1 - id=" + p.getId()));
l1.setTooltip(p.getId());
l1.getParent().appendChild(p);
p = new Popup();
p.appendChild(new Html("Popup #2 - id=" + p.getId()));
l2.setTooltip(p.getId());
l2.getParent().appendChild(p);
</zscript>
</window>
Logged In: YES
user_id=587090
Originator: YES
PS: this code worked in 2.4.0.
Also, could you please provide a work-around for 3.0.0 if possible (or release a bug fix update?)?
- Godmar
Logged In: YES
user_id=1684431
Originator: NO
Fixed since 11/29.
Logged In: YES
user_id=1684431
Originator: NO
Cause: Both components are rendered the same id automatically.
/Jumper
Logged In: YES
user_id=587090
Originator: YES
How did you fix it?
I work around the bug by implementing RawId:
import org.zkoss.zk.ui.ext.RawId;
// work-around
class RawIdPopup extends Popup implements RawId { }
p = new RawIdPopup();
Is this safe?