0

Create and Close a window with the button in ZK Framework

asked 2012-11-17 15:58:43 +0800

elcapo2008 gravatar image elcapo2008
6 1

updated 2012-11-17 16:37:06 +0800

Hi to everyone!

I'm from Venezuela and a newbie in ZK's world, so I have the next code:



<fisheye label="Bienvenida" onClick="" image="../images/ico/landscape_bar/home.png">
<attribute name="onClick"><![CDATA[{
final Window w=(Window) Executions.createComponents("bienvenida.zul",null, null);
w.setClosable(true);
w.doEmbedded();
}
]]></attribute>
</fisheye>


It works perfect but when I do click over the button "Bienvenida" again, it creates the same window "Bienvenida".

I tried to put an Id in bienvenida.zul but when I do click over button "Bienvenida" again it gives me the next message:
"Not unique in ID space [Page rHxP_]:"

So, I would like to know if there is a way to create my window bienvenida.zul clicking on button "Bienvenida" and close it with the same button.

or something like this:

First click on "Bienvenida" = create bienvenida.zul
Second click on "Bienvenida" = close bienvenida.zul

If someone knows something about it please help me and I'll be pretty pretty grateful!

Best regards!

delete flag offensive retag edit
Be the first one to reply this discussion!
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: 2012-11-17 15:58:43 +0800

Seen: 120 times

Last updated: Nov 17 '12

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