0

window.doModal() behavior

asked 2006-04-08 13:10:06 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3676186

By: the-e-factory


Hi,

I use window.doModal() method, works fine, (it's a window with include (src applet on jsp) and a button)= all java code no .zul files)

Window window = new Window();
window.setId("modal");
comp.getParent().appendChild(window);
try {
window.doModal();
} catch (InterruptedException e1) {
e1.printStackTrace();
}

Like in the zkdemo I use a button on the window with a eventlistener where I use the detach() method:

comp.getFellow("modal").detach();

I have the following behavior:
firefox:
the window get detached but the browser stays blocked for user response.

IE
the button on the window is also blocked for user response so I can't use the detach feature.

thanks in advance
eduard







delete flag offensive retag edit

22 Replies

Sort by ยป oldest newest

answered 2006-04-08 13:23:11 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3676193

By: the-e-factory


When I use: window.doPopup() and when I use the feature that the window dissapears when I click outside the popup window, I can't ge it again because: not unique in id space page : modal but in the zkdemo there is also the id=win set explicitly?


link publish delete flag offensive edit

answered 2006-04-08 16:26:18 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3676318

By: the-e-factory


I extract the code and now it's the same on firefox and IE: the window get detached but user response keeps blocked.

when I use:
window.setClosable(true);
closing the window has the desired effect!

link publish delete flag offensive edit

answered 2006-04-08 16:55:58 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3676337

By: the-e-factory


In de devguide I see that I have to call the endmodal method, but I don't see this method in the api?

link publish delete flag offensive edit

answered 2006-04-09 01:28:55 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3676709

By: henrichen

Hi,

Would you provide the zuml code that cause the issue? We don't seem to be able to replicate it.

Did you use the 4/7 nightly?

/henri

link publish delete flag offensive edit

answered 2006-04-09 13:06:19 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3677025

By: the-e-factory


Hi I use the 4/7 nightly, with the following testcode (normally I use seperate classes for the listeners etc, but just to make live easyer ;-)

the test.zul:

<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="res/teststyles.css" type="text/css" ?> <?page title="FotoAlbumBeheerder"?>


<zk>


<div use="com.fotoalbum.view.TButton" >

</div>




</zk>

The TButton class:

package com.fotoalbum.view;

import com.potix.zk.ui.event.Event;
import com.potix.zk.ui.event.EventListener;
import com.potix.zul.html.Button;
import com.potix.zul.html.Div;
import com.potix.zul.html.Window;

public class TButton extends Div {


public TButton(){
this.setId("div");
makeLayout();
}

private void makeLayout() {

Button b = new Button("make modal window");
this.appendChild(b);
b.addEventListener("onClick", new EventListener(){

public void onEvent(Event e) {
Window window = new Window();
window.setId("win");
window.setWidth("20em");
window.setHeight("20em");
window.setTitle("test modal window");
window.setClosable(true);
Button b = new Button("detach");
b.addEventListener("onClick", new EventListener(){

public void onEvent(Event e) {
e.getTarget().getFellow("win").detach();
}

public boolean isAsap() {
return false;
}

});
window.appendChild(b);

e.getPage().getFellow("div").appendChild(window);
try {
window.doModal();
} catch (InterruptedException e2) {
e2.printStackTrace();
}
}

public boolean isAsap() {
return false;
}

});
}

}

So the poblem short: in ff and ie
-when the window gets detached the userinput stays blocked.
-When you use the closable feature, it's impossible to create the window again because of unique in IdSpace issue.

Hopefully you can use this code?

I noticed also the following:
I use same textboxes on the modal window with some contstraints, the contraint work but the warning appears behind the modal window, so isn't visible for the user?
I made some simple constraintclasses that implement the Connstraint interface, but when I want to use more then 1 constraint for a textbox (with
textbox.setConstraint(constraint);)
only the constraint that is added last seems to be working, the others are ignored?

Thanks
eduard






link publish delete flag offensive edit

answered 2006-04-09 18:36:28 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3677316

By: the-e-factory


When I use a listbox and a checkbox on the window:

When the checkbox is checked I use the following method on the listbox:
listbox.selectAll();
then I have the following error in the browser:

Failed to process setAttr
this.setSelectedId is not a function
_pcp1
selectAll

I use the same checkbox for deselecting the listbox (listbox with
listbox.setCheckmark(true);)

The behavior is okAc, and after this first error it is possible to select and deselect the checkbox/listbox without a problem?

When I use some grids with the above listbox, a radiogroup, on the window: when they become visible (component.setVisible(true);) the window gets fixed on the screen and the closable behavior is broken ?

In FF the grid with the listbox don't renders itself well on the screen when I set them visible?

thankx
eduard




link publish delete flag offensive edit

answered 2006-04-09 20:53:56 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3677439

By: the-e-factory


When I use a listbox and I set the listbox.setRows(n), when there are more items in the list then n, IE don't render the listitems properly, they go out of the listbox (scrrollbars do appear) thanks

link publish delete flag offensive edit

answered 2006-04-10 01:38:53 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3677644

By: henrichen

Hi eduard,

I think it is some kind of racing condition in client engine (a bug) caused the problem. Make the isAsap() to return true should help.

public boolean isAsap() { return true; }

/henri


link publish delete flag offensive edit

answered 2006-04-10 01:55:10 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3677658

By: henrichen

"the warning appears behind the modal window, "

Hi eduard,

Please post this to bug for tracking. Thanks.

/henri

link publish delete flag offensive edit

answered 2006-04-10 02:01:15 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3677663

By: henrichen

"I made some simple constraintclasses that implement the Connstraint interface, but when I want to use more then 1 constraint for a textbox (with
textbox.setConstraint(constraint);)
only the constraint that is added last seems to be working, the others are ignored?
"

Can you provide codes that replicate the issue? So we can handle it quickly.

/henri

P.S. May I suggest discussing an issue in a seperate forum item; that it is easier to be tracked and searched by others in the community. 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: 2006-04-08 13:10:06 +0800

Seen: 1,297 times

Last updated: Apr 17 '06

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