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

Dan Haywood updated ISIS-1340:
------------------------------
    Fix Version/s:     (was: 1.13.0)
                   1.12.0
      Description: 
The issue is the HideMixinsForHomePage, which has the code:

{code}
@Subscribe
    public void on(Object_rebuildMetamodel.ActionDomainEvent ev) {        final 
List<Object> arguments = ev.getArguments();
        if(arguments.get(0) instanceof HomePageViewModel) {
            ev.hide();
        }
}
{code}

This was written in the belief (mistaken) that the mixin is set as the 0th 
argument.  In fact, this is true for hide and disable, but is empty for 
validate.

The short term fix is to add a guard to only perform the veto on the "HIDE" 
phase.

The longer term fix involves reworking the way in which events from mixins 
surface the mixedIn event... it isn't really correct to make the mixin 
available as an argument; unlike contributed actions, it is a separate thing 
altogether (to whit: the argument to the mixin's constructor).

Since this has been broken for a while (since 1.10), propose patching for 
1.12.0, and doing a proper fix in 1.13.0.

> Rebuild metamodel mixin action isn't working reliably
> -----------------------------------------------------
>
>                 Key: ISIS-1340
>                 URL: https://issues.apache.org/jira/browse/ISIS-1340
>             Project: Isis
>          Issue Type: Bug
>          Components: Core
>            Reporter: Dan Haywood
>            Assignee: Dan Haywood
>            Priority: Minor
>             Fix For: 1.12.0
>
>
> The issue is the HideMixinsForHomePage, which has the code:
> {code}
> @Subscribe
>     public void on(Object_rebuildMetamodel.ActionDomainEvent ev) {        
> final List<Object> arguments = ev.getArguments();
>         if(arguments.get(0) instanceof HomePageViewModel) {
>             ev.hide();
>         }
> }
> {code}
> This was written in the belief (mistaken) that the mixin is set as the 0th 
> argument.  In fact, this is true for hide and disable, but is empty for 
> validate.
> The short term fix is to add a guard to only perform the veto on the "HIDE" 
> phase.
> The longer term fix involves reworking the way in which events from mixins 
> surface the mixedIn event... it isn't really correct to make the mixin 
> available as an argument; unlike contributed actions, it is a separate thing 
> altogether (to whit: the argument to the mixin's constructor).
> Since this has been broken for a while (since 1.10), propose patching for 
> 1.12.0, and doing a proper fix in 1.13.0.



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

Reply via email to