0

Execution diferences Firefox/IE

asked 2010-08-05 13:40:13 +0800

andreasboos gravatar image andreasboos
105 3

Hello
Our application uses IFrame on windows. Iframe these we open other files zul. When I run using the IE everything works as expected. The class composer is performed only once. But if I run the same code on firefox the composer runs twice. Follows a code to reproduce the problem.

test.zul

<?xml version="1.0" encoding="UTF-8"?>
<window
apply="test.MyComposer"
width="300px" height="300px"
id="test">

<button
id="btnOpen"
width="100px"
height="21px"
label="Open window" >

<attribute name="onClick">
Window w = new Window();
w.setParent(test);
Iframe f = new Iframe();
f.setSrc("http://localhost:8400/zk/test2.zul");
w.setWidth("400px");
w.setHeight("400px");

f.setWidth("100%");
f.setHeight("100%");
f.setParent(w);

w.doModal();
</attribute>
</button>
</window>


test.MyComposer.java

package test;

import org.zkoss.zk.ui.Component;
import org.zkoss.zk.ui.util.GenericAutowireComposer;

public class MyComposer extends GenericAutowireComposer {
public MyComposer() {
super('$', false, true);
}

@Override
public void doAfterCompose(Component comp) throws Exception {
super.doAfterCompose(comp);
System.out.println("doAfterCompose " + comp.getId());
}
}

test2.zul

<?xml version="1.0" encoding="UTF-8"?>
<window
apply="test.MyComposer"
width="300px" height="300px"
id="test2">
<label id="lbl" value="Hi. I'm test2.zul" />
</window>

After execution, the console comes out this:

doAfterCompose test
doAfterCompose test2
doAfterCompose test2

What's wrong?


Thanks in advance.

delete flag offensive retag edit

3 Replies

Sort by ยป oldest newest

answered 2010-08-06 08:53:57 +0800

andreasboos gravatar image andreasboos
105 3

Sorry about the lack of more information.
Follows:
IE version 8
Firefox version: 3.6.4
zkee-eval-bin-5.0.4-FL-2010-07-27

Thanks

link publish delete flag offensive edit

answered 2010-08-13 03:11:05 +0800

RyanWu gravatar image RyanWu
533 2
about.me/flyworld

This bug will be fixed in next release
https://sourceforge.net/tracker/?func=detail&atid=785191&aid=1952402&group_id=152762

link publish delete flag offensive edit

answered 2010-08-13 08:19:05 +0800

andreasboos gravatar image andreasboos
105 3

Hi
The problem was solved for Zul different files: the file to be opened in the iframe is not the file that this opening. But if the window is open that the iframe is the same zul file that calls the error repeats.

Simply replace the line:
f.setSrc (http://localhost:8400/zk/test2.zul ");

By

f.setSrc (http://localhost:8400/zk/test.zul ");

I say this because our application has a zul file that acts as an entry point into the application. It, through the controller, we mount the screen dynamically.

So in order to simulate the problem just open the file itself Zul (test.zul) inside the iframe.

Incidentally, even after this fix the problem happens in IE.

Thanks

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: 2010-08-05 13:40:13 +0800

Seen: 580 times

Last updated: Aug 13 '10

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