use of com.evolveum.midpoint.web.page.admin.workflow.EvaluatedTriggerGroupPanel in project midpoint by Evolveum.
the class ApprovalProcessesPreviewPanel method initLayout.
private void initLayout() {
ListView<ApprovalProcessExecutionInformationDto> list = new ListView<ApprovalProcessExecutionInformationDto>(ID_PROCESSES, getModel()) {
@Override
protected void populateItem(ListItem<ApprovalProcessExecutionInformationDto> item) {
item.add(new Label(ID_NAME, LoadableModel.create(() -> {
String targetName = item.getModelObject().getTargetName();
if (targetName != null) {
return ApprovalProcessesPreviewPanel.this.getString("ApprovalProcessesPreviewPanel.processRelatedTo", targetName);
} else {
return getString("ApprovalProcessesPreviewPanel.process");
}
}, false)));
item.add(new ApprovalProcessExecutionInformationPanel(ID_PREVIEW, item.getModel()));
item.add(new EvaluatedTriggerGroupPanel(ID_TRIGGERS, new PropertyModel<>(item.getModel(), ApprovalProcessExecutionInformationDto.F_TRIGGERS)));
}
};
add(list);
}
use of com.evolveum.midpoint.web.page.admin.workflow.EvaluatedTriggerGroupPanel in project midpoint by Evolveum.
the class SwitchableApprovalProcessPreviewsPanel method initLayout.
private void initLayout(IModel<Boolean> showNextStagesModel) {
setOutputMarkupId(true);
WebMarkupContainer nextStagesContainer = new WebMarkupContainer(ID_NEXT_STAGES_CONTAINER);
nextStagesContainer.add(new ApprovalProcessExecutionInformationPanel(ID_NEXT_STAGES, nextStagesModel));
nextStagesContainer.add(WebComponentUtil.createHelp(ID_NEXT_STAGES_HELP));
nextStagesContainer.add(new VisibleBehaviour(() -> nextStagesModel.getObject() != null && CollectionUtils.isNotEmpty(nextStagesModel.getObject().getStages()) && displayedProcessInfoBox == ProcessInfoBox.NEXT_STAGES));
add(nextStagesContainer);
WebMarkupContainer wholeProcessContainer = new WebMarkupContainer(ID_WHOLE_PROCESS_CONTAINER);
wholeProcessContainer.add(new ApprovalProcessExecutionInformationPanel(ID_WHOLE_PROCESS, wholeProcessModel));
wholeProcessContainer.add(new EvaluatedTriggerGroupPanel(ID_TRIGGERS, new PropertyModel<>(wholeProcessModel, ApprovalProcessExecutionInformationDto.F_TRIGGERS)));
wholeProcessContainer.add(WebComponentUtil.createHelp(ID_WHOLE_PROCESS_HELP));
wholeProcessContainer.add(new VisibleBehaviour(() -> displayedProcessInfoBox == ProcessInfoBox.WHOLE_PROCESS));
add(wholeProcessContainer);
WebMarkupContainer showNextStagesContainer = new WebMarkupContainer(ID_SHOW_NEXT_STAGES_CONTAINER);
showNextStagesContainer.add(new AjaxFallbackLink<Void>(ID_SHOW_NEXT_STAGES) {
private static final long serialVersionUID = 1L;
@Override
public void onClick(Optional<AjaxRequestTarget> target) {
displayedProcessInfoBox = ProcessInfoBox.NEXT_STAGES;
target.get().add(SwitchableApprovalProcessPreviewsPanel.this);
}
});
showNextStagesContainer.add(WebComponentUtil.createHelp(ID_SHOW_NEXT_STAGES_HELP));
showNextStagesContainer.add(new VisibleBehaviour(() -> Boolean.TRUE.equals(showNextStagesModel.getObject()) && displayedProcessInfoBox != ProcessInfoBox.NEXT_STAGES));
add(showNextStagesContainer);
WebMarkupContainer showWholeProcessContainer = new WebMarkupContainer(ID_SHOW_WHOLE_PROCESS_CONTAINER);
showWholeProcessContainer.add(new AjaxFallbackLink<Void>(ID_SHOW_WHOLE_PROCESS) {
private static final long serialVersionUID = 1L;
@Override
public void onClick(Optional<AjaxRequestTarget> target) {
displayedProcessInfoBox = ProcessInfoBox.WHOLE_PROCESS;
target.get().add(SwitchableApprovalProcessPreviewsPanel.this);
}
});
showWholeProcessContainer.add(new VisibleBehaviour(() -> displayedProcessInfoBox != ProcessInfoBox.WHOLE_PROCESS));
showWholeProcessContainer.add(WebComponentUtil.createHelp(ID_SHOW_WHOLE_PROCESS_HELP));
add(showWholeProcessContainer);
}
Aggregations