-
FEATURED COMPONENTS
First time here? Check out the FAQ!
1 | initial version | |
I am creating a bunch of components dynamically in java - add manually creating event listeners for them as follows:
Idspace linkWrapper = new Idspace();
linkWrapper.setSclass("link-wrapper");
Button linkButton = new Button();
linkButton.addEventListener(Events.ON_CLICK, new org.zkoss.zk.ui.event.EventListener() {
@Override
public void onEvent(Event event) throws Exception {
...
}
});
linkWrapper.appendChild(linkButton);
Do I have to remove all of the event listeners for these buttons manually or will
linkWapper.getChildren().clear()
remove all of the event listeners for me ?
2 | No.2 Revision |
I am creating a bunch of components dynamically in java - add manually creating event listeners for them as follows:
Idspace linkWrapper = new Idspace();
linkWrapper.setSclass("link-wrapper");
Button linkButton = new Button();
linkButton.addEventListener(Events.ON_CLICK, new org.zkoss.zk.ui.event.EventListener() {
@Override
public void onEvent(Event event) throws Exception {
...
}
});
linkWrapper.appendChild(linkButton);
Do I have to remove all of the event listeners for these buttons manually or will
linkWapper.getChildren().clear()
remove all of the event listeners for me ?