final UniqueKey<? extends Model> showModelKey = getWaveBean(wave).getShowModelKey();
if (showModelKey == null) {
LOGGER.error("ModelClass is null");
throw new CoreRuntimeException("Illegal action : Model Class is null");
}
// Retrieve the mode according to its keyPart
final Model modelInstance = getLocalFacade().getGlobalFacade().getUiFacade().retrieve(showModelKey);
//
// if (keyPart == null) {
// modelInstance = getLocalFacade().getGlobalFacade().getUiFacade().retrieve(modelClass);
// } else {
// modelInstance = getLocalFacade().getGlobalFacade().getUiFacade().retrieve(modelClass, keyPart);
// }
if (modelInstance == null) {
LOGGER.error("Model " + showModelKey.getClassField().getSimpleName() + " couldn't be created");
throw new CoreRuntimeException("Illegal action : Model Instance is null: " + showModelKey.getClassField().getName());
}
// Attach the model to allow reuse later in the process
getWaveBean(wave).setShowModel(modelInstance);