0

Problem with Window.doModal

asked 2010-02-10 09:39:21 +0800

ziccardi gravatar image ziccardi
321 7

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

delete flag offensive retag edit

6 Replies

Sort by ยป oldest newest

answered 2010-02-10 09:55:40 +0800

ziccardi gravatar image ziccardi
321 7

An update: the ZK version is not 3.6.3, but is 5.0.0 sorry for the mistake

link publish delete flag offensive edit

answered 2010-02-10 10:07:26 +0800

ziccardi gravatar image ziccardi
321 7

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

link publish delete flag offensive edit

answered 2010-04-18 11:58:29 +0800

Arsen gravatar image Arsen
383 4

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.

link publish delete flag offensive edit

answered 2010-04-19 02:17:18 +0800

Arsen gravatar image Arsen
383 4

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?

link publish delete flag offensive edit

answered 2010-04-20 20:13:38 +0800

jimmyshiau gravatar image jimmyshiau
4921 5
http://www.zkoss.org/ ZK Team

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); 

link publish delete flag offensive edit

answered 2010-04-21 00:40:29 +0800

Arsen gravatar image Arsen
383 4

Thanks a lot for your response, but I've already found solution here

    <system-config>
        <ui-factory-class>org.zkoss.spring.bean.ZkSpringUiFactory</ui-factory-class>
    </system-config>

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

RSS

Stats

Asked: 2010-02-10 09:39:21 +0800

Seen: 1,970 times

Last updated: Apr 21 '10

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