You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@isis.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2015/01/29 09:57:35 UTC

[jira] [Commented] (ISIS-968) Rationalize handling of menu actions and contributed actions

    [ https://issues.apache.org/jira/browse/ISIS-968?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14296606#comment-14296606 ] 

ASF subversion and git services commented on ISIS-968:
------------------------------------------------------

Commit aa8d2f3c4b6c35d16a9f69bcdf154822d08ea8a9 in isis's branch refs/heads/ISIS-968 from [~danhaywood]
[ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=aa8d2f3 ]

ISIS-968: adding unit tests, updates to the todo app.


> Rationalize handling of menu actions and contributed actions
> ------------------------------------------------------------
>
>                 Key: ISIS-968
>                 URL: https://issues.apache.org/jira/browse/ISIS-968
>             Project: Isis
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: core-1.7.0
>            Reporter: Dan Haywood
>            Assignee: Dan Haywood
>            Priority: Minor
>             Fix For: core-1.8.0
>
>
> Currently we have the following annotations:
> * on the domain service: @Hidden - to hide all actions (still in the metamodel); nb: this has been deprecated in ISIS-970 with no replacement
> * on the action: @NotContributed to suppress being contributed, optionally @NotContributed(As.ASSOCIATION) or @NotContributed(As.ACTION); is still in menu
> * on the action: @NotInServiceMenu to suppress being in menu; can still be contributed.
> This is all somewhat clumsy, and the negative @NotXxx annotations are confusing to read (@NotContributed(As.Xxx) in particular).
> ~~~
> In Naked Objects MVC they distinguish between three different "types" of service:
> - menu services (actions are on menus and are contributed)
> - contributions (actions are only ever contributed)
> - system services (actions never appear on menu or are contributed).
> This separation works well; "domain-level" system services (typically factories and repositories) are injected into the "view-level" menu or contribution services.
> ~~~
> This ticket proposes:
> Extend @DomainService to characterize the nature of each domain (similar to NO MVC):
> {code}
> @DomainService(nature=VIEW | VIEW_MENU | VIEW_CONTRIBUTIONS | DOMAIN )
> {code}
> where:
> * VIEW = current behaviour, and the default
> * VIEW_MENU = actions are not contributed
> * VIEW_CONTRIBUTIONS = in other words actions are not in service menu
> * DOMAIN = are not shown in view ie actions implicitly hidden
> In addition, extend @ActionLayout to include further UI hints:
> {code}
> @ActionLayout(
>     contributedAs    = ACTION|ASSOCIATION|BOTH   // default is "BOTH"; equivalent (inverse of) the current @NotContributed(As.Xxx)
> )
> {code}
> which for domain service of VIEW or VIEW_CONTRIBUTIONS can restrict the contribution if required.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)