Uploaded image for project: 'Causeway'
  1. Causeway
  2. CAUSEWAY-1340

Rebuild metamodel mixin action isn't working reliably

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 1.12.0
    • Core
    • None

    Description

      The issue is the HideMixinsForHomePage, which has the code:

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

      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.

      Attachments

        Activity

          People

            danhaywood Daniel Keir Haywood
            danhaywood Daniel Keir Haywood
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: