You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@isis.apache.org by Adam Howard <ho...@gmail.com> on 2013/02/17 09:50:15 UTC

@Aggregated annotation

I want to start getting the @Aggregated annotation working in the Wicket
viewer. I synced my isis clone and started looking at the source and saw
that the only viewer that uses it now is Scimpi. So I wanted to fire up the
Scimpi viewer to see what's done there but I had problems adding it to my
project[1]. When running mvn jetty:run I get the following exception:

2013-02-17 02:27:40.971:WARN:/onaboat-viewer-scimpi:unavailable
org.apache.isis.core.commons.config.IsisConfigurationException: No
configuration available
    at
org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext.getConfiguration(IsisContext.java:320)
    at
org.apache.isis.viewer.scimpi.dispatcher.debug.DebugUsers.initialize(DebugUsers.java:49)
    at
org.apache.isis.viewer.scimpi.servlet.DispatcherServlet.init(DispatcherServlet.java:85)
    at javax.servlet.GenericServlet.init(GenericServlet.java:241)
    ...

I thought maybe Scimpi (at 0.2.0-incubating) was incompatible with the
1.1.0 release of Isis so I went back to Dan's revenue.ie demo[2] and after
turning off the json viewer I was able to start up using the jetty-console
war. But, when I go to localhost:8080/index.shtml I get the following
exception:

Error while processing swf:services element at
/scimpi/style/template.shtml:25 - null
...
Caused by: java.lang.NullPointerException
    at
org.apache.isis.viewer.scimpi.dispatcher.context.RequestContext.mappedObject(RequestContext.java:194)
    at
org.apache.isis.viewer.scimpi.dispatcher.context.RequestContext.getMappedObject(RequestContext.java:151)
    at
org.apache.isis.viewer.scimpi.dispatcher.view.action.Methods.writeMethods(Methods.java:97)
    at
org.apache.isis.viewer.scimpi.dispatcher.view.action.Methods.writeMethods(Methods.java:73)
    at
org.apache.isis.viewer.scimpi.dispatcher.view.action.Services.process(Services.java:50)
    at
org.apache.isis.viewer.scimpi.dispatcher.processor.Request.process(Request.java:149)
    ...

So I don't know if anyone is running the Scimpi viewer with a current Isis
release or if anyone happens to know how Scimpi handles @Aggregated objects
(Rob?) but I'd like to make Wicket handle them similarly (fully embedded
fields?, fieldset to distinguish grouping?, etc.)

Thanks.
--
Adam

[1] https://github.com/adamhoward/onaboat/tree/master/viewer-scimpi
[2] https://github.com/danhaywood/apacheisis-demo

Re: @Aggregated annotation

Posted by Robert Matthews <rm...@nakedobjects.org>.
Hi Adam

Sorry, but I've been out of the loop for a while. I've just got the 
latest code and created the archetype (see below), generated a project 
from it and run up the application fine.  Not quite sure where you are 
deviating? The archetype is very poor at the moment, but expect some 
check-ins shortly as I merge in some old archetype work I did some time ago.

To get the archetype into the repository I did the following (on my 
machine so the paths will differ):

$ cd ~/apache/isis/example/application/quickstart_scimpi_nosql
$ mvn archetype:create-from-project
$ cd target/generated-sources/archetype/
$ mvn clean install

Then I created the new project with

$ mvn archetype:generate -DarchetypeCatalog=local

Once we've got this running, I'll take you through use of Aggregate.

Regards

Rob



On 17/02/13 08:50, Adam Howard wrote:
> I want to start getting the @Aggregated annotation working in the Wicket
> viewer. I synced my isis clone and started looking at the source and saw
> that the only viewer that uses it now is Scimpi. So I wanted to fire up the
> Scimpi viewer to see what's done there but I had problems adding it to my
> project[1]. When running mvn jetty:run I get the following exception:
>
> 2013-02-17 02:27:40.971:WARN:/onaboat-viewer-scimpi:unavailable
> org.apache.isis.core.commons.config.IsisConfigurationException: No
> configuration available
>      at
> org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext.getConfiguration(IsisContext.java:320)
>      at
> org.apache.isis.viewer.scimpi.dispatcher.debug.DebugUsers.initialize(DebugUsers.java:49)
>      at
> org.apache.isis.viewer.scimpi.servlet.DispatcherServlet.init(DispatcherServlet.java:85)
>      at javax.servlet.GenericServlet.init(GenericServlet.java:241)
>      ...
>
> I thought maybe Scimpi (at 0.2.0-incubating) was incompatible with the
> 1.1.0 release of Isis so I went back to Dan's revenue.ie demo[2] and after
> turning off the json viewer I was able to start up using the jetty-console
> war. But, when I go to localhost:8080/index.shtml I get the following
> exception:
>
> Error while processing swf:services element at
> /scimpi/style/template.shtml:25 - null
> ...
> Caused by: java.lang.NullPointerException
>      at
> org.apache.isis.viewer.scimpi.dispatcher.context.RequestContext.mappedObject(RequestContext.java:194)
>      at
> org.apache.isis.viewer.scimpi.dispatcher.context.RequestContext.getMappedObject(RequestContext.java:151)
>      at
> org.apache.isis.viewer.scimpi.dispatcher.view.action.Methods.writeMethods(Methods.java:97)
>      at
> org.apache.isis.viewer.scimpi.dispatcher.view.action.Methods.writeMethods(Methods.java:73)
>      at
> org.apache.isis.viewer.scimpi.dispatcher.view.action.Services.process(Services.java:50)
>      at
> org.apache.isis.viewer.scimpi.dispatcher.processor.Request.process(Request.java:149)
>      ...
>
> So I don't know if anyone is running the Scimpi viewer with a current Isis
> release or if anyone happens to know how Scimpi handles @Aggregated objects
> (Rob?) but I'd like to make Wicket handle them similarly (fully embedded
> fields?, fieldset to distinguish grouping?, etc.)
>
> Thanks.
> --
> Adam
>
> [1] https://github.com/adamhoward/onaboat/tree/master/viewer-scimpi
> [2] https://github.com/danhaywood/apacheisis-demo
>


Re: @Aggregated annotation

Posted by Dan Haywood <da...@haywood-associates.co.uk>.
Hi Adam,
Rob would be the man to answer this, but he's being a bit elusive.  I'm
trying to track him down to see if he can enlighten us.

That said, here's some thoughts on how to enhance the Wicket viewer.

First thing is that I noticed Alain Zhang has raised a ticket [1] that the
Wicket viewer is broken anyway with aggregated entities (irrespective of
providing special rendering support for that annotation).  So that would
need looking into first.

Assuming that that works, what I think would need to be provided is a
variant on the ReferencePanelFactory and ReferencePanel: let's call them
AggregatedReferencePanelFactory and AggregatedReferencePanel.

>From the aggregate root entities perspective, it will have a reference to
the aggregated entity, and so it will have a ScalarModel representing the
value of the OneToOneAssociation (entity property) where the
ObjectSpecification (class) of that OTOA property will have the
AggregatedFacet.

Thus, the "appliesTo" method in the AggregatedReferencePanelFactory will
need to do this check on the ObjectSpec for the AggregatedFacet.

In the AggregatedReferencePanel, its responsibility would be to recursively
show the properties of the aggregated entity.  You could probably borrow
some of the code in EntitiesPropertiesPanel.  However, I think there must
still only be one outer HTML FORM to submit.

One thing that'll need to be worked through is the unpicking of the updated
values when that FORM is submitted.  Since the UI has the aggregated
entity's properties "flattened" into the aggregate root's, something
somewhere will need to distinguish between the properties of the aggregate
and those of the aggregated.  I'm not sure how this will pan out, exactly.

Something similar needs to be done for the action parameters form also,
though in this case I think that the Wicket viewer will need to instantiate
the aggregated entity on-the-fly in order to call the action with an
argument of the right type.

Hope that helps, if only a little...

Dan



[1] https://issues.apache.org/jira/browse/ISIS-295

On 17 February 2013 08:50, Adam Howard <ho...@gmail.com> wrote:

> I want to start getting the @Aggregated annotation working in the Wicket
> viewer. I synced my isis clone and started looking at the source and saw
> that the only viewer that uses it now is Scimpi. So I wanted to fire up the
> Scimpi viewer to see what's done there but I had problems adding it to my
> project[1]. When running mvn jetty:run I get the following exception:
>
> 2013-02-17 02:27:40.971:WARN:/onaboat-viewer-scimpi:unavailable
> org.apache.isis.core.commons.config.IsisConfigurationException: No
> configuration available
>     at
>
> org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext.getConfiguration(IsisContext.java:320)
>     at
>
> org.apache.isis.viewer.scimpi.dispatcher.debug.DebugUsers.initialize(DebugUsers.java:49)
>     at
>
> org.apache.isis.viewer.scimpi.servlet.DispatcherServlet.init(DispatcherServlet.java:85)
>     at javax.servlet.GenericServlet.init(GenericServlet.java:241)
>     ...
>
> I thought maybe Scimpi (at 0.2.0-incubating) was incompatible with the
> 1.1.0 release of Isis so I went back to Dan's revenue.ie demo[2] and after
> turning off the json viewer I was able to start up using the jetty-console
> war. But, when I go to localhost:8080/index.shtml I get the following
> exception:
>
> Error while processing swf:services element at
> /scimpi/style/template.shtml:25 - null
> ...
> Caused by: java.lang.NullPointerException
>     at
>
> org.apache.isis.viewer.scimpi.dispatcher.context.RequestContext.mappedObject(RequestContext.java:194)
>     at
>
> org.apache.isis.viewer.scimpi.dispatcher.context.RequestContext.getMappedObject(RequestContext.java:151)
>     at
>
> org.apache.isis.viewer.scimpi.dispatcher.view.action.Methods.writeMethods(Methods.java:97)
>     at
>
> org.apache.isis.viewer.scimpi.dispatcher.view.action.Methods.writeMethods(Methods.java:73)
>     at
>
> org.apache.isis.viewer.scimpi.dispatcher.view.action.Services.process(Services.java:50)
>     at
>
> org.apache.isis.viewer.scimpi.dispatcher.processor.Request.process(Request.java:149)
>     ...
>
> So I don't know if anyone is running the Scimpi viewer with a current Isis
> release or if anyone happens to know how Scimpi handles @Aggregated objects
> (Rob?) but I'd like to make Wicket handle them similarly (fully embedded
> fields?, fieldset to distinguish grouping?, etc.)
>
> Thanks.
> --
> Adam
>
> [1] https://github.com/adamhoward/onaboat/tree/master/viewer-scimpi
> [2] https://github.com/danhaywood/apacheisis-demo
>

Re: @Aggregated annotation

Posted by Kevin Meyer <ke...@kmz.co.za>.
Hi Adam,

I just took a quick look, and it looks very good!
Even on my phone!

Thanks for persisting with this...

Kevin
-- 
Sent from my phone with K-9 Mail.
Please excuse my brevity.

Re: @Aggregated annotation

Posted by Dan Haywood <da...@haywood-associates.co.uk>.
Hi Adam,
thanks for doing this.  within.


On 18 February 2013 07:58, Adam Howard <ho...@gmail.com> wrote:

> Dan,
>
> I just discovered @MemberGroups tonight. I did a little "fake it until you
> make it" work and pushed it to Heroku[1].


[aside]: you've done this several times now... it's really good.  Could you
distil the steps into a little cribsheet for the benefit of the community?


By applying the Law of Demeter[2]
> and names on the @MemberOrder annotation I have what may be a good way of
> displaying @Aggregated objects in Wicket. Check out the Find All action
> under Cargo. I've "exploded" each quasi-Aggregated object into Cargo so
> that it has getters for each property that defer to the Aggregated
> property.
>
> public class Cargo {
>   private RouteSpecification routeSpecification;
>   @MemberOrder(sequence="1", name="Route Specification")
>   public Location getRouteSpecificationOrigin() {
>     return routeSpecification.getOrigin();
>   }
> ...
> }
>
> Full Cargo class here[3].
>
> Do you like this better (automatically creating member groups for
> @Aggregated properties and faking them to Wicket) than creating a separate
> panel?


I think what you've ended up with as a UI is pretty much exactly what I had
envisaged.  The enhancement to the wicket viewer would basically just
remove the boilerplate on lines 73~95 and make the RouteSpec property
visible (line 63).



> For my purpose I think the visual distinction given by member groups
> is adequate.
>
> Agreed.

Maybe in the future fieldsets/membergroups might become collapsible, but
that would happen for both regular member groups and also for aggregated
objects.

The benefit of us adding support for this feature is that it'll encourage
the discovery of domain concepts / help build the ubiquitous language of
the domain.  So it's definitely worth progressing, in my view.

Dan



> --
> Adam
>
> [1] http://immense-brook-7613.herokuapp.com/wicket/
> [2] http://en.wikipedia.org/wiki/Law_of_Demeter
> [3]
>
> https://github.com/adamhoward/onaboat/blob/master/dom/src/main/java/onaboat/domain/model/cargo/Cargo.java#L74
>
>
>
>
> On Mon, Feb 18, 2013 at 12:04 AM, Adam Howard <ho...@gmail.com>
> wrote:
>
> > Dan:
> > Thanks for the detailed overview. I created a JIRA ticket to start
> working
> > on it[1]. I don't think the issue in the ticket you sent is related since
> > it looks like it happens on non-@Aggregated objects as well.
> >
> > Kevin:
> > Thanks. I didn't think to look at the claims example. It worked great.
> > After getting Scimpi to run though I still don't know how it uses that
> > @Aggregated annotation. I created a new class and annotated it as
> > @Aggregated then added a property to Employee of my new class. But
> clicking
> > "view" on an Employee just showed the title of my new property (no link
> as
> > if it were a separate entity which is good) and clicking "edit" did not
> let
> > me change (or see) the properties of my @Aggregated class within the
> > Employee.
> >
> > I'm going to continue along the path Dan described and see where that
> > leads me.
> >
> > --
> > Adam
> >
> > [1] https://issues.apache.org/jira/browse/ISIS-348
> >
> >
> > On Sun, Feb 17, 2013 at 1:32 PM, Kevin Meyer - KMZ <kevin@kmz.co.za
> >wrote:
> >
> >> Hi Adam,
> >>
> >> I got the Scimpi viewer to run earlier this evening from within Eclipse
> >> (Juno) by using the IDE launcher in the, for example:
> >> claims-viewer-scimpi module:
> >> In "/ide/eclipse/launch" there is a file "claims-viewer-scimpi.launch".
> >> Right-click on the file and choose between "Debug as.." or "Run as.."
> >> option "1 claims-viewer-scimpi".
> >>
> >> If you get an Eclipse error about "... references non-existing
> project..",
> >> then edit the .launch file:
> >> Find the line that starts with:
> >>
> >> <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="
> >>
> >> and edit the value string to match the project name as it appears in
> >> your workspace (e.g. I had to change the quickstart_scimpi_nosql
> >> value to
> >> "quickstart_scimpi_nosql-viewer-scimpi")
> >>
> >> I also had to edit the isis.properties to disable the authentication:
> >> from:
> >> isis.authentication=file
> >> to
> >> #isis.authentication=file
> >>
> >> It seems that the file authentication module has not been added to the
> >> project.
> >>
> >> It seems that there is something "generic" about the isis.properties, as
> >> the file is set up to use the in-memory object store whereas the
> >> project name indicates that nosql should be used...
> >>
> >>
> >> Anyway, hope something in the  above helps you somehow..
> >>
> >> Regards,
> >> Kevin
> >>
> >> On 17 Feb 2013 at 2:50, Adam Howard wrote:
> >>
> >> > I want to start getting the @Aggregated annotation working in the
> Wicket
> >> > viewer. I synced my isis clone and started looking at the source and
> saw
> >> > that the only viewer that uses it now is Scimpi. So I wanted to fire
> up
> >> the
> >> > Scimpi viewer to see what's done there but I had problems adding it to
> >> my
> >> > project[1]. When running mvn jetty:run I get the following exception:
> >> >
> >> > 2013-02-17 02:27:40.971:WARN:/onaboat-viewer-scimpi:unavailable
> >> > org.apache.isis.core.commons.config.IsisConfigurationException: No
> >> > configuration available
> >> >     at
> >> >
> >>
> org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext.getConfiguration(IsisContext.java:320)
> >> >     at
> >> >
> >>
> org.apache.isis.viewer.scimpi.dispatcher.debug.DebugUsers.initialize(DebugUsers.java:49)
> >> >     at
> >> >
> >>
> org.apache.isis.viewer.scimpi.servlet.DispatcherServlet.init(DispatcherServlet.java:85)
> >> >     at javax.servlet.GenericServlet.init(GenericServlet.java:241)
> >> >     ...
> >> >
> >> > I thought maybe Scimpi (at 0.2.0-incubating) was incompatible with the
> >> > 1.1.0 release of Isis so I went back to Dan's revenue.ie demo[2] and
> >> after
> >> > turning off the json viewer I was able to start up using the
> >> jetty-console
> >> > war. But, when I go to localhost:8080/index.shtml I get the following
> >> > exception:
> >> >
> >> > Error while processing swf:services element at
> >> > /scimpi/style/template.shtml:25 - null
> >> > ...
> >> > Caused by: java.lang.NullPointerException
> >> >     at
> >> >
> >>
> org.apache.isis.viewer.scimpi.dispatcher.context.RequestContext.mappedObject(RequestContext.java:194)
> >> >     at
> >> >
> >>
> org.apache.isis.viewer.scimpi.dispatcher.context.RequestContext.getMappedObject(RequestContext.java:151)
> >> >     at
> >> >
> >>
> org.apache.isis.viewer.scimpi.dispatcher.view.action.Methods.writeMethods(Methods.java:97)
> >> >     at
> >> >
> >>
> org.apache.isis.viewer.scimpi.dispatcher.view.action.Methods.writeMethods(Methods.java:73)
> >> >     at
> >> >
> >>
> org.apache.isis.viewer.scimpi.dispatcher.view.action.Services.process(Services.java:50)
> >> >     at
> >> >
> >>
> org.apache.isis.viewer.scimpi.dispatcher.processor.Request.process(Request.java:149)
> >> >     ...
> >> >
> >> > So I don't know if anyone is running the Scimpi viewer with a current
> >> Isis
> >> > release or if anyone happens to know how Scimpi handles @Aggregated
> >> objects
> >> > (Rob?) but I'd like to make Wicket handle them similarly (fully
> embedded
> >> > fields?, fieldset to distinguish grouping?, etc.)
> >> >
> >> > Thanks.
> >> > --
> >> > Adam
> >> >
> >> > [1] https://github.com/adamhoward/onaboat/tree/master/viewer-scimpi
> >> > [2] https://github.com/danhaywood/apacheisis-demo
> >> >
> >>
> >>
> >
>

Re: @Aggregated annotation

Posted by Adam Howard <ho...@gmail.com>.
Dan,

I just discovered @MemberGroups tonight. I did a little "fake it until you
make it" work and pushed it to Heroku[1]. By applying the Law of Demeter[2]
and names on the @MemberOrder annotation I have what may be a good way of
displaying @Aggregated objects in Wicket. Check out the Find All action
under Cargo. I've "exploded" each quasi-Aggregated object into Cargo so
that it has getters for each property that defer to the Aggregated property.

public class Cargo {
  private RouteSpecification routeSpecification;
  @MemberOrder(sequence="1", name="Route Specification")
  public Location getRouteSpecificationOrigin() {
    return routeSpecification.getOrigin();
  }
...
}

Full Cargo class here[3].

Do you like this better (automatically creating member groups for
@Aggregated properties and faking them to Wicket) than creating a separate
panel? For my purpose I think the visual distinction given by member groups
is adequate.

--
Adam

[1] http://immense-brook-7613.herokuapp.com/wicket/
[2] http://en.wikipedia.org/wiki/Law_of_Demeter
[3]
https://github.com/adamhoward/onaboat/blob/master/dom/src/main/java/onaboat/domain/model/cargo/Cargo.java#L74




On Mon, Feb 18, 2013 at 12:04 AM, Adam Howard <ho...@gmail.com> wrote:

> Dan:
> Thanks for the detailed overview. I created a JIRA ticket to start working
> on it[1]. I don't think the issue in the ticket you sent is related since
> it looks like it happens on non-@Aggregated objects as well.
>
> Kevin:
> Thanks. I didn't think to look at the claims example. It worked great.
> After getting Scimpi to run though I still don't know how it uses that
> @Aggregated annotation. I created a new class and annotated it as
> @Aggregated then added a property to Employee of my new class. But clicking
> "view" on an Employee just showed the title of my new property (no link as
> if it were a separate entity which is good) and clicking "edit" did not let
> me change (or see) the properties of my @Aggregated class within the
> Employee.
>
> I'm going to continue along the path Dan described and see where that
> leads me.
>
> --
> Adam
>
> [1] https://issues.apache.org/jira/browse/ISIS-348
>
>
> On Sun, Feb 17, 2013 at 1:32 PM, Kevin Meyer - KMZ <ke...@kmz.co.za>wrote:
>
>> Hi Adam,
>>
>> I got the Scimpi viewer to run earlier this evening from within Eclipse
>> (Juno) by using the IDE launcher in the, for example:
>> claims-viewer-scimpi module:
>> In "/ide/eclipse/launch" there is a file "claims-viewer-scimpi.launch".
>> Right-click on the file and choose between "Debug as.." or "Run as.."
>> option "1 claims-viewer-scimpi".
>>
>> If you get an Eclipse error about "... references non-existing project..",
>> then edit the .launch file:
>> Find the line that starts with:
>>
>> <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="
>>
>> and edit the value string to match the project name as it appears in
>> your workspace (e.g. I had to change the quickstart_scimpi_nosql
>> value to
>> "quickstart_scimpi_nosql-viewer-scimpi")
>>
>> I also had to edit the isis.properties to disable the authentication:
>> from:
>> isis.authentication=file
>> to
>> #isis.authentication=file
>>
>> It seems that the file authentication module has not been added to the
>> project.
>>
>> It seems that there is something "generic" about the isis.properties, as
>> the file is set up to use the in-memory object store whereas the
>> project name indicates that nosql should be used...
>>
>>
>> Anyway, hope something in the  above helps you somehow..
>>
>> Regards,
>> Kevin
>>
>> On 17 Feb 2013 at 2:50, Adam Howard wrote:
>>
>> > I want to start getting the @Aggregated annotation working in the Wicket
>> > viewer. I synced my isis clone and started looking at the source and saw
>> > that the only viewer that uses it now is Scimpi. So I wanted to fire up
>> the
>> > Scimpi viewer to see what's done there but I had problems adding it to
>> my
>> > project[1]. When running mvn jetty:run I get the following exception:
>> >
>> > 2013-02-17 02:27:40.971:WARN:/onaboat-viewer-scimpi:unavailable
>> > org.apache.isis.core.commons.config.IsisConfigurationException: No
>> > configuration available
>> >     at
>> >
>> org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext.getConfiguration(IsisContext.java:320)
>> >     at
>> >
>> org.apache.isis.viewer.scimpi.dispatcher.debug.DebugUsers.initialize(DebugUsers.java:49)
>> >     at
>> >
>> org.apache.isis.viewer.scimpi.servlet.DispatcherServlet.init(DispatcherServlet.java:85)
>> >     at javax.servlet.GenericServlet.init(GenericServlet.java:241)
>> >     ...
>> >
>> > I thought maybe Scimpi (at 0.2.0-incubating) was incompatible with the
>> > 1.1.0 release of Isis so I went back to Dan's revenue.ie demo[2] and
>> after
>> > turning off the json viewer I was able to start up using the
>> jetty-console
>> > war. But, when I go to localhost:8080/index.shtml I get the following
>> > exception:
>> >
>> > Error while processing swf:services element at
>> > /scimpi/style/template.shtml:25 - null
>> > ...
>> > Caused by: java.lang.NullPointerException
>> >     at
>> >
>> org.apache.isis.viewer.scimpi.dispatcher.context.RequestContext.mappedObject(RequestContext.java:194)
>> >     at
>> >
>> org.apache.isis.viewer.scimpi.dispatcher.context.RequestContext.getMappedObject(RequestContext.java:151)
>> >     at
>> >
>> org.apache.isis.viewer.scimpi.dispatcher.view.action.Methods.writeMethods(Methods.java:97)
>> >     at
>> >
>> org.apache.isis.viewer.scimpi.dispatcher.view.action.Methods.writeMethods(Methods.java:73)
>> >     at
>> >
>> org.apache.isis.viewer.scimpi.dispatcher.view.action.Services.process(Services.java:50)
>> >     at
>> >
>> org.apache.isis.viewer.scimpi.dispatcher.processor.Request.process(Request.java:149)
>> >     ...
>> >
>> > So I don't know if anyone is running the Scimpi viewer with a current
>> Isis
>> > release or if anyone happens to know how Scimpi handles @Aggregated
>> objects
>> > (Rob?) but I'd like to make Wicket handle them similarly (fully embedded
>> > fields?, fieldset to distinguish grouping?, etc.)
>> >
>> > Thanks.
>> > --
>> > Adam
>> >
>> > [1] https://github.com/adamhoward/onaboat/tree/master/viewer-scimpi
>> > [2] https://github.com/danhaywood/apacheisis-demo
>> >
>>
>>
>

Re: @Aggregated annotation

Posted by Adam Howard <ho...@gmail.com>.
Dan:
Thanks for the detailed overview. I created a JIRA ticket to start working
on it[1]. I don't think the issue in the ticket you sent is related since
it looks like it happens on non-@Aggregated objects as well.

Kevin:
Thanks. I didn't think to look at the claims example. It worked great.
After getting Scimpi to run though I still don't know how it uses that
@Aggregated annotation. I created a new class and annotated it as
@Aggregated then added a property to Employee of my new class. But clicking
"view" on an Employee just showed the title of my new property (no link as
if it were a separate entity which is good) and clicking "edit" did not let
me change (or see) the properties of my @Aggregated class within the
Employee.

I'm going to continue along the path Dan described and see where that leads
me.

--
Adam

[1] https://issues.apache.org/jira/browse/ISIS-348


On Sun, Feb 17, 2013 at 1:32 PM, Kevin Meyer - KMZ <ke...@kmz.co.za> wrote:

> Hi Adam,
>
> I got the Scimpi viewer to run earlier this evening from within Eclipse
> (Juno) by using the IDE launcher in the, for example:
> claims-viewer-scimpi module:
> In "/ide/eclipse/launch" there is a file "claims-viewer-scimpi.launch".
> Right-click on the file and choose between "Debug as.." or "Run as.."
> option "1 claims-viewer-scimpi".
>
> If you get an Eclipse error about "... references non-existing project..",
> then edit the .launch file:
> Find the line that starts with:
>
> <stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="
>
> and edit the value string to match the project name as it appears in
> your workspace (e.g. I had to change the quickstart_scimpi_nosql
> value to
> "quickstart_scimpi_nosql-viewer-scimpi")
>
> I also had to edit the isis.properties to disable the authentication:
> from:
> isis.authentication=file
> to
> #isis.authentication=file
>
> It seems that the file authentication module has not been added to the
> project.
>
> It seems that there is something "generic" about the isis.properties, as
> the file is set up to use the in-memory object store whereas the
> project name indicates that nosql should be used...
>
>
> Anyway, hope something in the  above helps you somehow..
>
> Regards,
> Kevin
>
> On 17 Feb 2013 at 2:50, Adam Howard wrote:
>
> > I want to start getting the @Aggregated annotation working in the Wicket
> > viewer. I synced my isis clone and started looking at the source and saw
> > that the only viewer that uses it now is Scimpi. So I wanted to fire up
> the
> > Scimpi viewer to see what's done there but I had problems adding it to my
> > project[1]. When running mvn jetty:run I get the following exception:
> >
> > 2013-02-17 02:27:40.971:WARN:/onaboat-viewer-scimpi:unavailable
> > org.apache.isis.core.commons.config.IsisConfigurationException: No
> > configuration available
> >     at
> >
> org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext.getConfiguration(IsisContext.java:320)
> >     at
> >
> org.apache.isis.viewer.scimpi.dispatcher.debug.DebugUsers.initialize(DebugUsers.java:49)
> >     at
> >
> org.apache.isis.viewer.scimpi.servlet.DispatcherServlet.init(DispatcherServlet.java:85)
> >     at javax.servlet.GenericServlet.init(GenericServlet.java:241)
> >     ...
> >
> > I thought maybe Scimpi (at 0.2.0-incubating) was incompatible with the
> > 1.1.0 release of Isis so I went back to Dan's revenue.ie demo[2] and
> after
> > turning off the json viewer I was able to start up using the
> jetty-console
> > war. But, when I go to localhost:8080/index.shtml I get the following
> > exception:
> >
> > Error while processing swf:services element at
> > /scimpi/style/template.shtml:25 - null
> > ...
> > Caused by: java.lang.NullPointerException
> >     at
> >
> org.apache.isis.viewer.scimpi.dispatcher.context.RequestContext.mappedObject(RequestContext.java:194)
> >     at
> >
> org.apache.isis.viewer.scimpi.dispatcher.context.RequestContext.getMappedObject(RequestContext.java:151)
> >     at
> >
> org.apache.isis.viewer.scimpi.dispatcher.view.action.Methods.writeMethods(Methods.java:97)
> >     at
> >
> org.apache.isis.viewer.scimpi.dispatcher.view.action.Methods.writeMethods(Methods.java:73)
> >     at
> >
> org.apache.isis.viewer.scimpi.dispatcher.view.action.Services.process(Services.java:50)
> >     at
> >
> org.apache.isis.viewer.scimpi.dispatcher.processor.Request.process(Request.java:149)
> >     ...
> >
> > So I don't know if anyone is running the Scimpi viewer with a current
> Isis
> > release or if anyone happens to know how Scimpi handles @Aggregated
> objects
> > (Rob?) but I'd like to make Wicket handle them similarly (fully embedded
> > fields?, fieldset to distinguish grouping?, etc.)
> >
> > Thanks.
> > --
> > Adam
> >
> > [1] https://github.com/adamhoward/onaboat/tree/master/viewer-scimpi
> > [2] https://github.com/danhaywood/apacheisis-demo
> >
>
>

Re: @Aggregated annotation

Posted by Kevin Meyer - KMZ <ke...@kmz.co.za>.
Hi Adam,

I got the Scimpi viewer to run earlier this evening from within Eclipse 
(Juno) by using the IDE launcher in the, for example:
claims-viewer-scimpi module:
In "/ide/eclipse/launch" there is a file "claims-viewer-scimpi.launch".
Right-click on the file and choose between "Debug as.." or "Run as.." 
option "1 claims-viewer-scimpi".

If you get an Eclipse error about "... references non-existing project..", 
then edit the .launch file:
Find the line that starts with:

<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="

and edit the value string to match the project name as it appears in 
your workspace (e.g. I had to change the quickstart_scimpi_nosql 
value to 
"quickstart_scimpi_nosql-viewer-scimpi")

I also had to edit the isis.properties to disable the authentication:
from:
isis.authentication=file
to
#isis.authentication=file

It seems that the file authentication module has not been added to the 
project.

It seems that there is something "generic" about the isis.properties, as 
the file is set up to use the in-memory object store whereas the 
project name indicates that nosql should be used...


Anyway, hope something in the  above helps you somehow..

Regards,
Kevin

On 17 Feb 2013 at 2:50, Adam Howard wrote:

> I want to start getting the @Aggregated annotation working in the Wicket
> viewer. I synced my isis clone and started looking at the source and saw
> that the only viewer that uses it now is Scimpi. So I wanted to fire up the
> Scimpi viewer to see what's done there but I had problems adding it to my
> project[1]. When running mvn jetty:run I get the following exception:
> 
> 2013-02-17 02:27:40.971:WARN:/onaboat-viewer-scimpi:unavailable
> org.apache.isis.core.commons.config.IsisConfigurationException: No
> configuration available
>     at
> org.apache.isis.runtimes.dflt.runtime.system.context.IsisContext.getConfiguration(IsisContext.java:320)
>     at
> org.apache.isis.viewer.scimpi.dispatcher.debug.DebugUsers.initialize(DebugUsers.java:49)
>     at
> org.apache.isis.viewer.scimpi.servlet.DispatcherServlet.init(DispatcherServlet.java:85)
>     at javax.servlet.GenericServlet.init(GenericServlet.java:241)
>     ...
> 
> I thought maybe Scimpi (at 0.2.0-incubating) was incompatible with the
> 1.1.0 release of Isis so I went back to Dan's revenue.ie demo[2] and after
> turning off the json viewer I was able to start up using the jetty-console
> war. But, when I go to localhost:8080/index.shtml I get the following
> exception:
> 
> Error while processing swf:services element at
> /scimpi/style/template.shtml:25 - null
> ...
> Caused by: java.lang.NullPointerException
>     at
> org.apache.isis.viewer.scimpi.dispatcher.context.RequestContext.mappedObject(RequestContext.java:194)
>     at
> org.apache.isis.viewer.scimpi.dispatcher.context.RequestContext.getMappedObject(RequestContext.java:151)
>     at
> org.apache.isis.viewer.scimpi.dispatcher.view.action.Methods.writeMethods(Methods.java:97)
>     at
> org.apache.isis.viewer.scimpi.dispatcher.view.action.Methods.writeMethods(Methods.java:73)
>     at
> org.apache.isis.viewer.scimpi.dispatcher.view.action.Services.process(Services.java:50)
>     at
> org.apache.isis.viewer.scimpi.dispatcher.processor.Request.process(Request.java:149)
>     ...
> 
> So I don't know if anyone is running the Scimpi viewer with a current Isis
> release or if anyone happens to know how Scimpi handles @Aggregated objects
> (Rob?) but I'd like to make Wicket handle them similarly (fully embedded
> fields?, fieldset to distinguish grouping?, etc.)
> 
> Thanks.
> --
> Adam
> 
> [1] https://github.com/adamhoward/onaboat/tree/master/viewer-scimpi
> [2] https://github.com/danhaywood/apacheisis-demo
>