-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi All.
I'm using ZK 3.6.3 on Tomcat 6.0.20, and I'm having a weird problem with doModal.
This is my code:
Window wnd = (Window) Executions.getCurrent().createComponents("/wf_pages/popups/docDetailPopup.zul", self, mArgs); try { wnd.doModal(); System.out.println ("This should appear only when window closes..."); } catch (Exception e) { e.printStackTrace(); }
The zul page is :
<?page title="Nuova Nota" contentType="text/html;charset=UTF-8"?> <zk> <window title="Nuova Nota" border="normal" width="600px" closable="true"> <vbox align="center"> <grid width="100%"> <rows> <row> <label value="Oggetto:"/> <textbox id="txtSubject"/> </row> <row> <cell colspan="2"> Contenuto: </cell> </row> <row> <cell colspan="2"> <textbox id="txtContent" rows="5" width="100%"/> </cell> </row> </rows> </grid> <button label="OK" id="btnOk"/> </vbox> </window> </zk>
Why do I see 'This should appear only when the window closes' even if the window is still open? In fact, it seems
doModal do not blocks at all...
Do you have any idea about what's wrong?
Thank you,
Massimiliano
Ok, I fixed that myself looking through the 'window' source code.
Inside that code, I found that if event-thread is disabled, than doModal calls doHilighted...
So, I found that, with version 5.0.0, event-thread is disabled by default.
To re-enable event thread, I had to put the following inside zk.xml:
<system-config>
<disable-event-thread >false</disable-event-thread>
</system-config>
Massimiliano
Hi, ziccardi.
I've got the same problem: doModal does not stops execution. But my zk.xml does not helps
<?xml version="1.0" encoding="UTF-8"?> <zk> <system-config> <disable-event-thread >false</disable-event-thread> </system-config> </zk>
I'm using 3.6.4 and problem began after I started using spring integration.
Please, guys, can anybody help me? I've looked inside zkspring-core.jar but have not found any overridings of disable-event-thread. Also documentation said that WEB-INF/zk.xml has the highest priority, but I does not work. Where am I wrong?
Hi Arsen
It is setting by JAVA
in org.zkoss.spring.init.WebAppInit.java
you can download the source code zk-spring-core-src-3.0RC.zip
//<disable-event-thread/> conf.enableEventThread(false);
Asked: 2010-02-10 09:39:21 +0800
Seen: 1,970 times
Last updated: Apr 21 '10