-
Type:
Bug
-
Resolution: Won't Fix
-
Priority:
Normal
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
https://sourceforge.net/tracker/?func=detail&aid=3303077&group_id=152762&atid=785191
Zk interaction (buttons, events, grid) is broken after I close a modal window. I have been debugging the ZK framework for a while to find the source of this issue.
I have a master.zul (with a masterComposer applied to its window component) that opens a modal window and load detail.zul (detailComposer) on it. I found that after I detach my popup, the DelegatingVariableResolverWithCache of the detail.zul ZUML is kept on the _resolvers list of the Page object. This being a LinkedList it adds the VariableResolvers in a FILO order. So it's like an stack. Then when I click the search button, the master.zul page tries to resolve the @
{masterComposer}references by looking at the first custom resolvers on the stack. And this is the resolver of the modal window not the parent screen, where the masterComposer does NOT exist. Then Spring creates a second instance of this bean because it has a scope "prototype" and add it to the variableResolver of the now supposedly destroyed popup ZUML.
So this code on the master.zul ZUML doesn't work anymore:
<listbox id="listCustomers" model="@
{masterComposer.customers, load-after='searchButton.onClick, winMaster.onOK'}" selectedItem="@
{masterComposer.customer}" width="100%" rows="0" checkmark="true" mold="paging" pageSize="5">
For a more detailed explanation of the issue with sample files check the forum: http://www.zkoss.org/forum/listComment/16132
As far as I know, this issue affects also Zk 3.6.4 and Zk 5.0.x