0

zk 3.6.3 bug - error windows modal

asked 2009-11-04 16:59:01 +0800

pymsoft gravatar image pymsoft
133 5

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

delete flag offensive retag edit

9 Replies

Sort by ยป oldest newest

answered 2009-11-04 17:20:17 +0800

pymsoft gravatar image pymsoft
133 5

sorry, but is not a bug only of version 3.6.3..., same error with version 3.6.2.


regards

Pedro Gonzalez

link publish delete flag offensive edit

answered 2009-11-04 19:17:47 +0800

iantsai gravatar image iantsai
2755 1

updated 2009-11-04 19:20:20 +0800

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.

link publish delete flag offensive edit

answered 2009-11-05 06:19:12 +0800

timo18146 gravatar image timo18146
189

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

link publish delete flag offensive edit

answered 2009-11-05 17:05:08 +0800

rex gravatar image rex
120 2

Are you talking about Highlighting or variables?

Highlighting the first win when the second is created from the first is my problem as well.

Can someone please help.

link publish delete flag offensive edit

answered 2009-11-05 19:01:55 +0800

pymsoft gravatar image pymsoft
133 5

updated 2009-11-05 19:04:48 +0800

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

link publish delete flag offensive edit

answered 2009-11-05 19:32:15 +0800

pymsoft gravatar image pymsoft
133 5

updated 2009-11-05 19:32:49 +0800

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

link publish delete flag offensive edit

answered 2009-11-05 19:35:17 +0800

rex gravatar image rex
120 2

That makes total sense. I am going to try it. thanks so much!

link publish delete flag offensive edit

answered 2009-11-07 04:19:28 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

updated 2009-11-07 04:20:08 +0800

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

link publish delete flag offensive edit

answered 2009-11-07 19:59:42 +0800

pymsoft gravatar image pymsoft
133 5

Stephan,


In fact, I made in this way.

thanks

regards

Pedro Gonzalez

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: 2009-11-04 16:59:01 +0800

Seen: 884 times

Last updated: Nov 07 '09

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