/** Invalidates this component. * It works for both the instant and defer mode. * Notice that all children will be detached (the instant mode) and * the page will be reloaded (and new children will be created). */ public void invalidate() { super.invalidate(); //invalidate is redundant in instant mode, but less memory leak in IE // see the comment inside applyChangesToContent(); applyChangesToContent(); if (_progressStatus >= 2) _progressStatus = 0; checkProgressing(); }
/** * Sets whether to show the {@link MZul#PLEASE_WAIT} message before a long operation. * This implementation will automatically use an echo event like {@link Events#echoEvent(String, org.zkoss.zk.ui.Component, String)} * to suspend the including progress before using the {@link Clients#showBusy(String)} * method to show the {@link MZul#PLEASE_WAIT} message at client side. * * <p>If setProgressing(true) is called, the <code>defer</code> mode is enabled automatically * if the current mode is <code>auto</code>. * * <p>Default: false. * @since 3.0.4 */ public void setProgressing(boolean progressing) { if (_progressing != progressing) { if (progressing && "instant".equals(_mode)) throw new UnsupportedOperationException("progressing not allowed in instant mode"); _progressing = progressing; fixMode(); //becomes defer mode if auto checkProgressing(); if (!_instantMode) { getChildren().clear(); invalidate(); } else super.invalidate(); } }