Search in sources :

Example 1 with OperationResultPopupPanel

use of com.evolveum.midpoint.gui.api.component.result.OperationResultPopupPanel in project midpoint by Evolveum.

the class ObjectDeltaOperationPanel method showFullResultsPerformed.

private void showFullResultsPerformed(AjaxRequestTarget target) {
    OperationResultPopupPanel operationResultPopupPanel = new OperationResultPopupPanel(getPageBase().getMainPopupBodyId(), createOperationResultModel());
    getPageBase().showMainPopup(operationResultPopupPanel, target);
}
Also used : OperationResultPopupPanel(com.evolveum.midpoint.gui.api.component.result.OperationResultPopupPanel)

Example 2 with OperationResultPopupPanel

use of com.evolveum.midpoint.gui.api.component.result.OperationResultPopupPanel in project midpoint by Evolveum.

the class TaskResultPanel method initLayout.

protected void initLayout() {
    IModel<List<OperationResult>> resultModel = new ReadOnlyModel<>(this::createOperationResultList);
    SelectableListDataProvider<SelectableBean<OperationResult>, OperationResult> provider = new SelectableListDataProvider<>(this, resultModel);
    BoxedTablePanel<SelectableBean<OperationResult>> resultTablePanel = new BoxedTablePanel<>(ID_OPERATION_RESULT, provider, initResultColumns());
    resultTablePanel.setOutputMarkupId(true);
    add(resultTablePanel);
    AjaxFallbackLink<Void> showResult = new AjaxFallbackLink<>(ID_SHOW_RESULT) {

        private static final long serialVersionUID = 1L;

        @Override
        public void onClick(Optional<AjaxRequestTarget> optionalTarget) {
            if (optionalTarget.isEmpty()) {
                LOGGER.warn("Cannot show result in interactive way, request target not present.");
                return;
            }
            AjaxRequestTarget target = optionalTarget.get();
            OperationResultPopupPanel body = new OperationResultPopupPanel(getPageBase().getMainPopupBodyId(), new Model<>(getTaskOperationResult()));
            body.setOutputMarkupId(true);
            getPageBase().showMainPopup(body, target);
        }
    };
    showResult.add(new VisibleBehaviour(() -> getTaskOperationResult() != null));
    showResult.setOutputMarkupId(true);
    add(showResult);
}
Also used : VisibleBehaviour(com.evolveum.midpoint.web.component.util.VisibleBehaviour) AjaxFallbackLink(org.apache.wicket.ajax.markup.html.AjaxFallbackLink) OperationResult(com.evolveum.midpoint.schema.result.OperationResult) AjaxRequestTarget(org.apache.wicket.ajax.AjaxRequestTarget) OperationResultPopupPanel(com.evolveum.midpoint.gui.api.component.result.OperationResultPopupPanel) ReadOnlyModel(com.evolveum.midpoint.gui.api.model.ReadOnlyModel) SelectableListDataProvider(com.evolveum.midpoint.web.component.util.SelectableListDataProvider) SelectableBean(com.evolveum.midpoint.web.component.util.SelectableBean) BoxedTablePanel(com.evolveum.midpoint.web.component.data.BoxedTablePanel)

Aggregations

OperationResultPopupPanel (com.evolveum.midpoint.gui.api.component.result.OperationResultPopupPanel)2 ReadOnlyModel (com.evolveum.midpoint.gui.api.model.ReadOnlyModel)1 OperationResult (com.evolveum.midpoint.schema.result.OperationResult)1 BoxedTablePanel (com.evolveum.midpoint.web.component.data.BoxedTablePanel)1 SelectableBean (com.evolveum.midpoint.web.component.util.SelectableBean)1 SelectableListDataProvider (com.evolveum.midpoint.web.component.util.SelectableListDataProvider)1 VisibleBehaviour (com.evolveum.midpoint.web.component.util.VisibleBehaviour)1 AjaxRequestTarget (org.apache.wicket.ajax.AjaxRequestTarget)1 AjaxFallbackLink (org.apache.wicket.ajax.markup.html.AjaxFallbackLink)1