0

Popup close on button click

asked 2010-07-07 18:51:18 +0800

diego898 gravatar image diego898
246 3

Hello all,

I have a window in a popup.zul file that loads jsut fine the first time. However, I cant figure out how to close it when the user presses the "close" button, I just hide it. Therefore, when you try and load it again I get an ID error.

<window id="myPopup" ...

<button label="close" onClick="myPopup.setVisible(false)" />

How do I just close the window?

Thanks

delete flag offensive retag edit

3 Replies

Sort by ยป oldest newest

answered 2010-07-07 20:09:38 +0800

henrichen gravatar image henrichen
3869 2
ZK Team

If you want to remove the popup, simply detach it from the page.

<button label="close" onClick="myPopup.detach()" />

So next time you load the file, a new popup component is created.

I also suggest reading the basic chapters of Developer's Guide. It helps clarify the concepts of ZK.

link publish delete flag offensive edit

answered 2014-08-26 20:27:24 +0800

Senthilchettyin gravatar image Senthilchettyin flag of India
2623 3 8
http://emrpms.blogspot.in...

Hey here you have used component id to detach, how the same can be done using MVVM without wiring the component in the View Model ?

link publish delete flag offensive edit

answered 2014-08-26 20:30:26 +0800

Senthilchettyin gravatar image Senthilchettyin flag of India
2623 3 8
http://emrpms.blogspot.in...

And also another problem if you detach, it is not showing again when moving the mouse

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-07-07 18:51:18 +0800

Seen: 913 times

Last updated: Aug 26 '14

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