-
Bug
-
Resolution: Fixed
-
Normal
-
5.0.7
-
None
Here is the code used for testing:
<zk>
<window apply="com.MyComposer">
<popup id="zulPu1"><label>content here</label></popup>
<popup id="zulPu2"/>
<popup id="zulPu3"/>
<vlayout id="container">
<label tooltip="zulPu1, position=after_end">Popup created in zul - good positioning</label>
<label tooltip="zulPu2, position=after_end">Popup created in zul, check for children and add child in Java - bad positioning, good on second hover</label>
<label tooltip="zulPu3, position=after_end">Popup created in zul 2, add child with no check for children in Java - bad positioning, good on second hover</label>
<label id="javaLbl">Popup created in java, check for children and add child in Java - bad positioning, good on second hover</label>
</vlayout>
</window>
</zk>
package com;
import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.util.GenericForwardComposer;
import org.zkoss.zul.Label;
import org.zkoss.zul.Popup;
import org.zkoss.zul.Vlayout;
public class MyComposer extends GenericForwardComposer {
protected Popup zulPu2;
protected Popup zulPu3;
protected Vlayout container;
protected Label javaLbl;
@Override
public void doAfterCompose(Component comp) throws Exception {
super.doAfterCompose(comp);
final Popup javaPu = new Popup();
container.appendChild(javaPu);
javaPu.setId("javaPu");
javaPu.addEventListener("onOpen", new EventListener() {
public void onEvent(Event e) throws Exception {
if (javaPu.getChildren().size() == 0)
}
});
javaLbl.setTooltip("javaPu, position=after_end");
}
public void onOpen$zulPu2(Event e) {
if (zulPu2.getChildren().size() == 0)
}
public void onOpen$zulPu3(Event e)
}