Search in sources :

Example 1 with ModelOperationStatusPanel

use of com.evolveum.midpoint.web.component.model.operationStatus.ModelOperationStatusPanel in project midpoint by Evolveum.

the class TaskOperationTabPanel method initLayout.

private void initLayout(final IModel<TaskDto> taskDtoModel, PageBase pageBase) {
    final PropertyModel<ModelOperationStatusDto> operationStatusModel = new PropertyModel<>(taskDtoModel, TaskDto.F_MODEL_OPERATION_STATUS);
    VisibleEnableBehaviour modelOpBehaviour = new VisibleEnableBehaviour() {

        @Override
        public boolean isVisible() {
            return operationStatusModel.getObject() != null;
        }
    };
    ModelOperationStatusPanel panel = new ModelOperationStatusPanel(ID_MODEL_OPERATION_STATUS_PANEL, operationStatusModel);
    panel.add(modelOpBehaviour);
    add(panel);
}
Also used : PropertyModel(org.apache.wicket.model.PropertyModel) VisibleEnableBehaviour(com.evolveum.midpoint.web.component.util.VisibleEnableBehaviour) ModelOperationStatusDto(com.evolveum.midpoint.web.component.model.operationStatus.ModelOperationStatusDto) ModelOperationStatusPanel(com.evolveum.midpoint.web.component.model.operationStatus.ModelOperationStatusPanel)

Aggregations

ModelOperationStatusDto (com.evolveum.midpoint.web.component.model.operationStatus.ModelOperationStatusDto)1 ModelOperationStatusPanel (com.evolveum.midpoint.web.component.model.operationStatus.ModelOperationStatusPanel)1 VisibleEnableBehaviour (com.evolveum.midpoint.web.component.util.VisibleEnableBehaviour)1 PropertyModel (org.apache.wicket.model.PropertyModel)1