Hi Adam,
thanks for doing this.  within.

On 18 February 2013 07:58, Adam Howard <[email protected]> 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 <[email protected]>
> 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 <[email protected]
> >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
> >> >
> >>
> >>
> >
>

Reply via email to