-
FEATURED COMPONENTS
First time here? Check out the FAQ!
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">
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
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?
Asked: 2014-05-02 13:27:58 +0800
Seen: 18 times
Last updated: Jul 31 '14