-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I create a window "win1"
from this window I create a new window modal "win2"
from this window (win2) I create a new window modal "win3"
but from win3 active (modal) I can change data from win2.... this is a bug
works ok with zk 3.6.2
Pedro Gonzalez
It seems this piece of code could cause the problem.
<window title="My First Window" border="normal" width="500px"> Hello, World! <window id="t" title="My First Window" border="normal" width="400px" closable="true" > <caption> <button label="modal" onClick="t.doModal()"/> <button label="embed" onClick="t.doEmbadded()"/> </caption> Hello, World! <window id="t2" title="My First Window" border="normal" width="300px" closable="true"> <caption> <button label="modal" onClick="t2.doModal()"/> <button label="embed" onClick="t2.doEmbadded()"/> </caption> Hello, World! </window> </window> </window>
I'll post a bug to SF.net.
if you define variable in parent window, it is always visible to child-window. so of course you can change the value.
this is no bug.
read here: http://docs.zkoss.org/wiki/Zscript#Scope_for_Each_ID_space
cheers,
Timo Goetze
Hi all,
I will try to explain better.
I create a first window (win1). (all ok)
from this window I create a second window modal. (win2) all ok. I cannot access to modify the data in first window (win1) because I created a modal window win2.
but if I create a third window (win3), I can modify data of win2.... I would prefer the previous behavior, dont' modify data in the previous window.
rex, my problem is the same. (Highlighting)
Doing the demo, I realized that is was my problem and not a bug of zk.
By the way, the new version is fast.!!!
Sorry. :-(
Here, my demo.
aa.zul
<?page title="Win1" contentType="text/html;charset=UTF-8"?> <zk> <window id="win1" title="My First Window" border="normal" width="900px"> Hello, World! <calendar /> <button label="modal 1" onClick="newWin()" /> <zscript> <![CDATA[ void newWin() { Window finestra2 = (Window) Executions.createComponents("/aa2.zul", null, null); finestra2.doModal(); } ]]> </zscript> </window> </zk>
aa2.zul
<?page title="Win 2" contentType="text/html;charset=UTF-8"?> <zk> <window id="win2" title="My Second Window" border="normal" width="600px" closable="true"> Hello, World 2! <calendar /> <button label="modal 2" onClick="newWin()" /> <zscript> <![CDATA[ void newWin() { Window finestra2 = (Window) Executions.createComponents("/aa3.zul", null, null); finestra2.doModal(); } ]]> </zscript> </window> </zk>
aa3.zul
<?page title="Win 3" contentType="text/html;charset=UTF-8"?> <zk> <window id="win3" title="My Third Window" border="normal" width="400px" closable="true"> Hello, World 3! <calendar /> </window> </zk>
Regards
rex,
I solved the problem in this way:
to create the window I did:
..
Window finestra4 = (Window) Executions.createComponents(
"/editMovimenti.zul", this, map);
..
and now I do it this way:
..
Window finestra4 = (Window) Executions.createComponents(
"/editMovimenti.zul", null, map);
..
the problem is the second parameter, the parent component...
thank all
Regards
Pedro Gonzalez
Hmmmmmm, i remember that i have made tests over three modal windows with listboxes.
As i made changes in the top modal window i can see the changes in all underlaying modal windows too.
I have done this by overhanding the controller himself in the params map on each new modal window (Executions.creatiCompo... ).
best
Stephan
Asked: 2009-11-04 16:59:01 +0800
Seen: 884 times
Last updated: Nov 07 '09