You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@isis.apache.org by "Matthias Burbach (JIRA)" <ji...@apache.org> on 2015/09/27 20:41:04 UTC
[jira] [Created] (ISIS-1201) autoComplete support fails validation
when using Collection as return type
Matthias Burbach created ISIS-1201:
--------------------------------------
Summary: autoComplete support fails validation when using Collection<T> as return type
Key: ISIS-1201
URL: https://issues.apache.org/jira/browse/ISIS-1201
Project: Isis
Issue Type: Bug
Components: Archetype: SimpleApp, Core
Affects Versions: 1.9.0
Environment: 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
Reporter: Matthias Burbach
Assignee: Dan Haywood
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.
:
################################################ 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();
// }
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)