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

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

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

ISIS-968: @ActionLayout(contributed=...) support.


> 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)

Reply via email to