* {@inheritDoc}
*/
@Override
protected void perform(final Wave wave) {
Model hideModel = getWaveBean(wave).getHideModel();
if (hideModel == null && getWaveBean(wave).getHideModelKey() != null) {
hideModel = getLocalFacade().getGlobalFacade().getUiFacade().retrieve(getWaveBean(wave).getHideModelKey());
}
Node hideNode = null;
if (hideModel == null) {
LOGGER.warn("Impossible to dettach a model because hideModel is null");
} else {
hideModel.doHideView(wave);
hideNode = hideModel.getRootNode();
if (hideNode == null) {
LOGGER.warn("Impossible to dettach model {} because the node is null", hideModel.getClass().getSimpleName());
} else {
if (getWaveBean(wave).getUniquePlaceHolder() != null) {
getWaveBean(wave).getUniquePlaceHolder().set(null);
} else if (getWaveBean(wave).getChidrenPlaceHolder() != null) {
getWaveBean(wave).getChidrenPlaceHolder().remove(hideNode);
} else {
LOGGER.warn("Impossible to detach model {}, no place holder found", hideModel.getClass().getSimpleName());
}
}
}
}