0

UI can't be modified in the rendering phase

asked 2012-06-06 07:18:08 +0800

xeridia gravatar image xeridia
47 1

Hi,

I have a zul:

<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver" ?>
<zk xmlns:n="native" xmlns:w="client">

	<div apply="org.zkoss.bind.BindComposer" viewModel="@id('vmCustomerData') @init(customerDataViewModel)"  validationMessages="@id('vmsgs')">
                       .........
                      <include src="include.zul?param1=value1" />
       </div>

</zk>

Include.zul contains:

<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver" ?>
<zk xmlns:n="native" xmlns:w="client">


<div apply="org.zkoss.bind.BindComposer" viewModel="@id('vmCustomer') @init(customerDetailViewModel)" validationMessages="@id('vmsgs')"
	form="@id('fx') @load(vmCustomer.entity) @save(vmCustomer.entity, before='doValidateAndSave') ">
       ........................
       <button label="Test" image="Test" onClick="@command('doValidateAndSave')" disabled="@load(not empty vmsgs)"/>
        ......................
</div>
</zk>


We are working with zk 6.0.1. This page loads ok, but when we go to another page an exception is throwed:

java.lang.IllegalStateException: UI can't be modified in the rendering phase
	at org.zkoss.zk.ui.impl.UiVisualizer.getAttrRespMap(UiVisualizer.java:299)
	at org.zkoss.zk.ui.impl.UiVisualizer.addSmartUpdate0(UiVisualizer.java:254)
	at org.zkoss.zk.ui.impl.UiVisualizer.addSmartUpdate(UiVisualizer.java:238)
	at org.zkoss.zk.ui.impl.UiEngineImpl.addSmartUpdate(UiEngineImpl.java:280)
	at org.zkoss.zk.ui.AbstractComponent.smartUpdate(AbstractComponent.java:1579)
	at org.zkoss.zk.ui.AbstractComponent.smartUpdate(AbstractComponent.java:1554)
	at org.zkoss.zk.ui.AbstractComponent.removeEventListener(AbstractComponent.java:2151)
	at org.zkoss.bind.impl.BinderImpl.removeEventCommandListenerIfExists(BinderImpl.java:1141)
	at org.zkoss.bind.impl.BinderImpl.removeBindings(BinderImpl.java:1744)
	at org.zkoss.bind.impl.BinderImpl.removeBindings(BinderImpl.java:1714)
	at org.zkoss.bind.tracker.impl.BindUiLifeCycle.removeBindings0(BindUiLifeCycle.java:114)
	at org.zkoss.bind.tracker.impl.BindUiLifeCycle.removeBindings(BindUiLifeCycle.java:97)
	at org.zkoss.bind.tracker.impl.BindUiLifeCycle.removeBindings(BindUiLifeCycle.java:101)
	at org.zkoss.bind.tracker.impl.BindUiLifeCycle.removeBindings(BindUiLifeCycle.java:101)
	at org.zkoss.bind.tracker.impl.BindUiLifeCycle.removeBindings(BindUiLifeCycle.java:101)
	at org.zkoss.bind.tracker.impl.BindUiLifeCycle.removeBindings(BindUiLifeCycle.java:101)
	at org.zkoss.bind.tracker.impl.BindUiLifeCycle.afterPageDetached(BindUiLifeCycle.java:93)
	at org.zkoss.zk.ui.util.Configuration.afterPageDetached(Configuration.java:1123)
	at org.zkoss.zk.ui.impl.DesktopImpl.removePage(DesktopImpl.java:812)
	at org.zkoss.zk.ui.impl.UiVisualizer.getResponses(UiVisualizer.java:621)
	at org.zkoss.zk.ui.impl.UiEngineImpl.getResponses(UiEngineImpl.java:1408)
	at org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1220)
	at org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:558)
	at org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:456)
	at org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:464)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter.doFilterInternal(OpenEntityManagerInViewFilter.java:147)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.authentication.preauth.AbstractPreAuthenticatedProcessingFilter.doFilter(AbstractPreAuthenticatedProcessingFilter.java:88)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.jasig.cas.client.util.HttpServletRequestWrapperFilter.doFilter(HttpServletRequestWrapperFilter.java:62)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.jasig.cas.client.validation.AbstractTicketValidationFilter.doFilter(AbstractTicketValidationFilter.java:196)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.jasig.cas.client.authentication.AuthenticationFilter.doFilter(AuthenticationFilter.java:93)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.jasig.cas.client.session.SingleSignOutFilter.doFilter(SingleSignOutFilter.java:110)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
	at java.lang.Thread.run(Thread.java:662)


Thanks in advance

delete flag offensive retag edit

1 Reply

Sort by ยป oldest newest

answered 2012-07-05 01:13:11 +0800

hawk gravatar image hawk
2295 1 5
http://hawkphoenix.blogsp... ZK Team

hi,
what do you mean by "go another page"? click button to trigger redirect? or just type a new page's url in a browser to visit it?

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: 2012-06-06 07:18:08 +0800

Seen: 296 times

Last updated: Jul 05 '12

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