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

autoComplete support fails validation when using Collection<T> as return type

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.9.0
    • 1.10.0
    • None
    • Mac OS X 10.10.2
      Eclipse Java EE IDE for Web Developers. Version: Mars Release (4.5.0) Build id: 20150621-1200
      JDK 1.8.0_60

    Description

      When using the autoComplete support method for an action with return type Collection<T> the meta model validation reports an error.
      It works, however, when using List instead of Collection.

      :

                                                                                                    1. ISIS METAMODEL VALIDATION ERRORS ################################################################

      domainapp.dom.simple.Connections#autoComplete0Create: has prefix autoComplete, is probably a supporting method for a property, collection or action. If the method is intended to be an action, then rename and use @ActionLayout(named="...") or ignore completely using @Programmatic

      Please inspect the above messages and correct your domain model.

      for this:
      ...
      //region > create (action)
      public static class CreateDomainEvent extends ActionDomainEvent<Connections> {
      public CreateDomainEvent(final Connections source, final Identifier identifier, final Object... arguments)

      { super(source, identifier, arguments); }

      }

      @Action(
      domainEvent = CreateDomainEvent.class
      )
      @MemberOrder(sequence = "3")
      public Connection create(
      final @ParameterLayout(named="System A") System systemA)

      { final Connection obj = container.newTransientInstance(Connection.class); obj.setName(systemA.getName()); obj.setSystemA(systemA); container.persistIfNotAlready(obj); return obj; }

      public Collection<System> autoComplete0Create(@MinLength(value = 1) final String search)

      { return systems.listAll(); }
      ...
      }

      while using choices instead of autoComplete works fine:

      public Collection<System> choices0Create() { return systems.listAll(); }

      // public Collection<System> autoComplete0Create(@MinLength(value = 1) final String search)

      { // return systems.listAll(); // }

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              matthias.burbach@tui.de Matthias Burbach
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: