Skip to content

Commit

Permalink
showFullResult link visibility
Browse files Browse the repository at this point in the history
  • Loading branch information
KaterynaHonchar committed Sep 27, 2021
1 parent 375b2a6 commit 0ab1927
Showing 1 changed file with 1 addition and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public IModel<?> getBody() {
};
showFullResultsLink.setOutputMarkupId(true);
showFullResultsLink.add(AttributeAppender.append("style", "cursor: pointer;"));
showFullResultsLink.add(new VisibleBehaviour(this::isShowFullResultVisible));
showFullResultsLink.add(new VisibleBehaviour(() -> getModelObject() != null && getModelObject().getExecutionResult() != null));
objectDeltaOperationMarkup.add(showFullResultsLink);

Label resourceName = new Label(ID_PARAMETERS_RESOURCE_NAME,
Expand Down Expand Up @@ -130,18 +130,6 @@ public void headerOnClickPerformed(AjaxRequestTarget target, IModel<SceneDto> mo

}

private boolean isShowFullResultVisible() {
ObjectDeltaOperationType modelObject = getModelObject();
if (modelObject == null) {
return false;
}
OperationResultType result = modelObject.getExecutionResult();
if (result == null) {
return false;
}
return !WebComponentUtil.isSuccessOrHandledError(result);
}

private String getBoxCssClass() {
if (getModel().getObject() == null) {
return " box-primary";
Expand Down

0 comments on commit 0ab1927

Please sign in to comment.