incubator-isis-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dan haywood <>
Subject Re: Problem with non-support of Collections as arguments.
Date Tue, 28 Jun 2011 16:49:01 GMT
Hi Iain,
What's (probably) happening here is that the addAll(int, Collection) method
is being interpreted as an action, and Isis does not allow actions to take
Collections as arguments (only values or entities).

The work-around should be to mark the action using
@org.apache.isis.annotation.Ignore.  Since this is an inherited method I
guess you'll need to trivially override the method in order to annotate it,

public void addAll(int x, java.util.Collection y) {
    super.addAll(x, y);

The above is all slightly theoretical, so let us know if it doesn't work.

An alternative approach might be to use delegation instead of inheritance
(ie make the generated class a delegate of a wrapper that Isis sees).


On 28 June 2011 17:41, Iain Flynn <> wrote:

> Hello again.
> Part of my MSc project involves attempting to generate domain classes from
> a model using Emfatic and integrate those with Isis.
> In order to do this, I have created a wrapper class that inherits from
> Emfatic's mandatory EObject supertype while calling all the functions of
> AbstractDomainType. I've tested this with hand-coded Isis domain classes and
> they work fine.
> However, implementing the generated domain classes with hand-coded
> repositories causes Isis to throw an error, citing EMF's EList's addAll(int,
> java.util.Collection) function (which appears to be inherited from
> java.util.List rather than being to do with EList).
> I've searched through my code attempting to see where this is called, with
> no success. the EObject supertype does not appear to call it either - it
> seems like the very appearance of such a method is causing Isis to throw an
> exception (I added a nonsense method with a Collection argument to an
> already-working class in an already-working project and Isis threw an
> identical exception).
> Does anyone have any advice?
> Thank you for reading,
> - Iain Flynn.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message