1

closable does not

asked 2014-05-02 13:27:58 +0800

TomHunter gravatar image TomHunter
21 2

updated 2014-05-02 13:51:33 +0800

sitansu gravatar image sitansu
2254 13
http://java91.blogspot.in...

I have a .zul page that opens a popup. I wanted to add a simple Close "X" button. From what I have read, this should be as simple as adding: closable="true". Unfortunately, that does not happen. What else could be wrong?

<window title="Select" width="400px" mode="modal" closable="true" use="org.mypath.MyClass">
delete flag offensive retag edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2014-07-27 05:41:06 +0800

Darksu gravatar image Darksu
1991 1 4

Hello TomHunter,

A better solution to your problem would be to remove the closable="true", and add the following script to your page:

<button type="button"  onClick="@command('onCancel')" />

Then in the controller class file you will add the following code:

@Command
public void onCancel() {
   win.detach();
}

Dont forget to specify the id of the window, and add the respective code in the class file as shown bellow:

@Wire("#exampleWin")
private Window win;

Best Regards,

Darksu

link publish delete flag offensive edit
0

answered 2014-07-31 04:28:18 +0800

vincentjian gravatar image vincentjian
2245 6

Hi, I tried the following simple zul page and I can see the close icon.

<window title="Select" width="400px" mode="modal" closable="true">
</window>

Did you override setClosable() API in org.mypath.MyClass? And what ZK version are you using?

link publish delete flag offensive edit
Your answer
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
1 follower

RSS

Stats

Asked: 2014-05-02 13:27:58 +0800

Seen: 18 times

Last updated: Jul 31 '14

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