-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi guys
I have another little Problem,
I want to add a modal login dialog. For a first test I have copied the code of the modal dialog from the ZK Component Explorer.
When I want to open the Dialog by clicking a test button the following error message appears:
"Event Processing Thread is disabled"
Where can I switch on this feature?
For further information have a lokk at the tomcat logs:
14.06.2009 17:14:41 org.zkoss.zk.ui.impl.UiEngineImpl handleError:1108
SCHWERWIEGEND: >>org.zkoss.zk.ui.SuspendNotAllowedException: Event processing thread is disabled
>> at org.zkoss.zul.Window.doModal(Window.java:539)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>> at java.lang.reflect.Method.invoke(Method.java:597)
>> at bsh.Reflect.invokeMethod(Unknown Source)
>> at bsh.Reflect.invokeObjectMethod(Unknown Source)
>> at bsh.Name.invokeMethod(Unknown Source)
>> at bsh.BSHMethodInvocation.eval(Unknown Source)
>>...
Do you have any hints for me. Thanks an lot and best wishes,
maik
Check the zk.xml and comment the line:
<system-config>
<disable-event-thread />
</system-config>
hi,
my zk.xml is purely empty...
which event listener class do i have to register??
I want to execute the following code.
<?page title="new page title" contentType="text/html;charset=UTF-8"?> <zk> <style src="style.css"/> <zscript> <![CDATA[//@IMPORT ]]><![CDATA[//@DECLARATION public void doLogin(){ final Window win = (Window) Executions.createComponents( "login.zul", null, null); win.setMaximizable(true); win.doModal(); } ]]></zscript> <window title="Venta Administration Services" border="normal" height="100%" width="100%"> <button label="login" onClick="doLogin()"> </button> </window> </zk>
Are you sure, you have WEB-INF/zk.xml file and it is empty? Because this really looks like you have event threads disabled with this config.
Btw. you can use modal-like dialogs even when event threads are disabled, just use win.doHighlighted(); method instead.
Maik, I ran your code with ZK 3.6 and no usage of zk.xml and works OK (Showing an error because I do not have a login.zul file).
As a suggestion check your web.xml or your ZK jar files...
Hi edudant and YamilBracho,
thanks for your posts.
So here is my zk.xml
<?xml version="1.0" encoding="UTF-8"?> <!-- Created by ZK Studio --> <zk> </zk>
<?xml version="1.0" encoding="UTF-8"?> <web-app id="WebApp_ID" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <display-name> vas</display-name> <context-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:/config/application-context.xml,classpath:/config/datasource-context.xml</param-value> </context-param> <listener> <description> Used to cleanup when a session is destroyed</description> <display-name> ZK Session Cleaner</display-name> <listener-class>org.zkoss.zk.ui.http.HttpSessionListener</listener-class> </listener> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <listener> <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class> </listener> <servlet> <description> The servlet loads the DSP pages.</description> <servlet-name>dspLoader</servlet-name> <servlet-class> org.zkoss.web.servlet.dsp.InterpreterServlet</servlet-class> </servlet> <servlet> <description> ZK loader for ZUML pages</description> <servlet-name>zkLoader</servlet-name> <servlet-class> org.zkoss.zk.ui.http.DHtmlLayoutServlet</servlet-class> <init-param> <param-name>update-uri</param-name> <param-value>/zkau</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet> <description> The asynchronous update engine for ZK</description> <servlet-name>auEngine</servlet-name> <servlet-class> org.zkoss.zk.au.http.DHtmlUpdateServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>dspLoader</servlet-name> <url-pattern>*.dsp</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>zkLoader</servlet-name> <url-pattern>*.zul</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>zkLoader</servlet-name> <url-pattern>*.zhtml</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>auEngine</servlet-name> <url-pattern>/zkau/*</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file>index.html</welcome-file> <welcome-file>index.htm</welcome-file> <welcome-file>index.jsp</welcome-file> <welcome-file>default.html</welcome-file> <welcome-file>default.htm</welcome-file> <welcome-file>default.jsp</welcome-file> <welcome-file>index.zul</welcome-file> </welcome-file-list> </web-app>
Hi,
if you're using Spring, please try to add the following to your zk.xml:
<system-config> <ui-factory-class>org.zkoss.spring.bean.ZkSpringUiFactory</ui-factory-class> </system-config>
Does this help?
Cheers,
Another Maik...;-)
Hi Maik,
thanks a lot for your post. I will try that, when I am back home. Do I have to call the
win = (Window) Executions.createComponents("login.zul", null, null) - function or another one during I am using spring?
Thanks,
the other other Maik
Hi all. I had the same problem, but after adding mentioned code to the zk.xml i wasn't able to start any other xxx.zul file than the one designed for modal login.
The resulting error looks like this, but I'm not able to understand it:
18.06.2009 12:47:23 org.apache.catalina.storeconfig.StoreLoader load
INFO: Find registry server-registry.xml at classpath resource
18.06.2009 12:47:23 org.apache.catalina.startup.Catalina start
INFO: Server startup in 9156 ms
18.06.2009 12:47:43 org.apache.catalina.core.StandardWrapperValve invoke
SCHWERWIEGEND: Servlet.service() for servlet zkLoader threw exception
org.zkoss.zk.ui.UiException: Callable only in the event listener
at org.zkoss.zk.ui.event.Events.sendEvent(Events.java:289)
at org.zkoss.zk.ui.event.Events.sendEvent(Events.java:303)
at org.zkoss.spring.config.ZkSpringBeanBindingComposer.bindController(ZkSpringBeanBindingComposer.java:123)
at org.zkoss.spring.config.ZkSpringBeanBindingComposer.bindControllers(ZkSpringBeanBindingComposer.java:109)
at org.zkoss.spring.config.ZkSpringBeanBindingComposer.bindComponent(ZkSpringBeanBindingComposer.java:92)
at org.zkoss.spring.config.ZkSpringBeanBindingComposer.doAfterCompose(ZkSpringBeanBindingComposer.java:68)
at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild0(UiEngineImpl.java:622)
at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:583)
at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:527)
at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:559)
at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:527)
at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate(UiEngineImpl.java:494)
at org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage0(UiEngineImpl.java:375)
at org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage(UiEngineImpl.java:296)
at org.zkoss.zk.ui.http.DHtmlLayoutServlet.process(DHtmlLayoutServlet.java:229)
at org.zkoss.zk.ui.http.DHtmlLayoutServlet.doGet(DHtmlLayoutServlet.java:166)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:627)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:619)
Do you have any ideas?
Thanks in advance for your hints,
Miguel
Hi all,
I have the same problem than dermaik81 (after having used ZK+Spring+Hibernate from Zeta).
I also use only these lines in my zk.xml :
<system-config> <ui-factory-class>org.zkoss.spring.bean.ZkSpringUiFactory</ui-factory-class> </system-config>
But, I get the same errors than Spanier...
Still no ideas?
Best regards.
Asked: 2009-06-14 15:18:36 +0800
Seen: 1,304 times
Last updated: Aug 10 '09