-
FEATURED COMPONENTS
First time here? Check out the FAQ!
How to know popup is still open or already close?
just register the onOpen event it will also fire when the popup closes.
here a very simple example for a popup being used as a tooltip printing the open state to the console:
<label value="hover" tooltip="pop"/>
<popup id="pop" onOpen='System.out.println("popup open: " + event.isOpen());'>popup text
</popup>
Of course you can listen to this event in a Composer or send a command to a ViewModel.
in Composer (MVC)
@Listen("onOpen=#pop")
public void onPopupChanged(OpenEvent event) {
if(!event.isOpen()) {
System.out.println("popup closed");
}
}
in zul File (MVVM)
onOpen="@command('popupChanged', open=event.open)"
in ViewModel
@Command("popupChanged")
public void onPopupChanged(@BindingParam("open") boolean open) {
if(!open) {
System.out.println("popup closed");
}
}
Asked: 2013-07-10 06:00:07 +0800
Seen: 32 times
Last updated: Jul 10 '13
composite component help [closed]
EL in a forEach @command not working?
Different template for each grid row
Cardlayout animation is broken
Grid RowRender slow using 6.5.1 and sizable=true
setVisible(false), component will load or not
Decimalbox and doublebox value rounded on iPad
history management with page status