You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@isis.apache.org by "Andi Huber (Jira)" <ji...@apache.org> on 2021/07/22 19:28:00 UTC

[jira] [Resolved] (ISIS-2818) Add overrides for XxxDomainEvent for hide/disable/veto to evaluate a function or supplier

     [ https://issues.apache.org/jira/browse/ISIS-2818?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andi Huber resolved ISIS-2818.
------------------------------
    Resolution: Fixed

veto(...) seems not compatible with this idea, but invalidate(...) does

> Add overrides for XxxDomainEvent for hide/disable/veto to evaluate a function or supplier
> -----------------------------------------------------------------------------------------
>
>                 Key: ISIS-2818
>                 URL: https://issues.apache.org/jira/browse/ISIS-2818
>             Project: Isis
>          Issue Type: Improvement
>          Components: Isis Core
>    Affects Versions: 2.0.0-M5
>            Reporter: Daniel Keir Haywood
>            Assignee: Andi Huber
>            Priority: Trivial
>             Fix For: 2.0.0-M6
>
>
> Rather than:
> {code:java}
> if (hubCurrentService.currentHub().isEmpty()) {
>   ev.hide();
> } {code}
> I'd prefer to write:
> {code:java}
> ev.hideIf(hubCurrentService.currentHub().isEmpty());{code}
> or more flexibly:
> {code:java}
> ev.hideIf(() -> hubCurrentService.currentHub().isEmpty()); {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)