All, I was able to fix the "unmappable character" problem by setting the encoding of the SampleLocations.java file to UTF-8 in vim. I don't know if the project.build.sourceEncoding maven property had any effect but it may still be a good idea to set it in the archetype.
I've also pushed the app to heroku[1]. What there is so far at least. Auth is set to bypass so login as whoever. Almost nothing works so don't be surprised by stack traces. But now I can refer to the running app rather than rely on my descriptions. I have an issue with a class acting as a wrapper around a few fields to keep them together as they are passed around. The class in question is RouteSpecification[2]. A RouteSpecification is made up of three fields: origin location, destination location, and arrival date. In the original dddsample, a Cargo contains a RouteSpecification meaning that the CARGO table has individual fields for spec_origin_id, spec_destination_id, and spec_arrival_date but in "object-land" they are treated as one instance of RouteSpecification. RouteSpecifications are not persisted in their own table. I see this as synonymous with creating a Name class to hold firstName and lastName and then having a Person class have a Name field. Could also apply to Address if Address was not a shareable entity. What I'd like to be able to do is define a method in my cargo repository[3]: public Cargo bookNewCargo(RouteSpecification spec) {...} and the page that gets generated includes fields for each of the RouteSpecification properties. Here is a screenshot of the page in the original dddsample[4]. I currently get a label with no fields next to it[5]. Dan, is this another case of a @Value that holds references to persisted entities (the two locations)? Thanks. -- Adam [1] http://immense-brook-7613.herokuapp.com/wicket/ [2] https://github.com/adamhoward/onaboat/blob/master/dom/src/main/java/onaboat/domain/model/cargo/RouteSpecification.java [3] https://github.com/adamhoward/onaboat/blob/master/dom/src/main/java/onaboat/domain/model/cargo/CargoRepository.java [4] https://www.dropbox.com/s/dqbzm6prgvfdiqv/book-new-cargo.png [5] http://immense-brook-7613.herokuapp.com/wicket/wicket/bookmarkable/org.apache.isis.viewer.wicket.ui.pages.action.ActionPage?pageType=ACTION&actionSingleResultsMode=REDIRECT&objectOid=onaboat.domain.model.cargo.CargoRepository:1&actionType=USER&actionOwningSpec=onaboat.domain.model.cargo.CargoRepository&actionId=bookNewCargo%28onaboat.domain.model.cargo.TrackingId,onaboat.domain.model.cargo.RouteSpecification%29&pageTitle=Book+New+Cargo&actionMode=PARAMETERS On Mon, Feb 11, 2013 at 10:23 PM, Kevin Meyer <ke...@kmz.co.za> wrote: > Hi Christian, > > I was going to suggest the Process pattern... > > As a (perhpas required) hack, can you delete the unused execution plans > after a user has made a choice? > > Of course, in a multi-user environment, you'd need some way of isolating > one user's plans from other users... > > Does the process pattern require the execution plans to be persisted? I > guess this is an issue with being stateless - you have persist the states > somewhere... > > Christian Steinebach <christian.steineb...@marintek.sintef.no> wrote: > > >Hi Kevin! > > > >As mentioned in another post, I've uploaded a simplified version of > >what I'm trying to do [1] > > > >The idea: > > > >A ToDoItem might have associated with it an execution plan with tasks. > >The plan is something like > > go somewhere > > do that > > go somewhere else > > and do something else > > > >Several execution plans are generated and the user should select one to > >fullfill the ToDoItem. For 'Buy Milk' it could be > > > >(1) - Go to the supermarket > > get some milk > > pay for the milk > > go home > > > >(2) - Go to the farm > > milk a cow > > pay the farmer > > go home > > > >etc. etc. > > > >In short: > >class ExecutionPlan{ > > List<ArrayList> getTasks(); > >} > >class Task{ > > properties where and what > >} > >class ExecutionPlanService { > > List<ExecutionPlan> getExecutionPlans(ToDoItem td); > >// to generate candidates of execution plans > >} > >class ToDoItem{ > > setExecutionPlan(executionPlan ep); > > List<ExecutionPlan> choicesExecutionPlan(){ > > return executionPlanService.getExecutionPlans(this); > > } > >} > > > >I've introduced another class > >@NonPersistable > >ExecutionPlanChooser{ > >...... > > public List<ExecutionPlan> choicesExecutionPlan(){ > > return eps.getExecutionPlans(toDoItem); > > } > >..... > >} > > > >trying to follow a Process Object Pattern (from Dan's book). > >In ExecutionPlanChooser the choicesExecutionPlan() is called 34 times > >before I even hit the drop-down list once. > > > >To run what is there: > >- install the fixtures > >- Select 'all not completed yet' > >- Select a ToDoItem > >- Click on 'Choose Execution Plan' (in the upper right corner) > >- Edit the displayed ExecutionPlanChooser > >- Select an execution plan from the drop down list (there are 34*3 now > >already) > >- click OK > >- Click on 'Do It' in the upper right corner. That will attach the > >selected execution plan to the ToDoItem. > > > >Next time someone tries to choose an execution plan, there will be 69*3 > >execution plans to choose from. :-( > >I'm obviously on the wrong track, but I'm out of ideas now. > > > > Any help is very much appreciated > > > > Christian > > > > > > > >[1] https://github.com/chris58/ToDoItemExecutionPlan.git > > > >________________________________________ > >From: Kevin Meyer - KMZ [ke...@kmz.co.za] > >Sent: Monday, February 11, 2013 8:39 PM > >To: users@isis.apache.org > >Subject: Re: Porting dddsample app > > > >Hi Christian, > > > >Is this [1] your git location? Have you recently commited what you've > >got? > > > >I can take a look, but probably only tomorrow evening.. > > > >Regards, > >Kevin > > > >[1] https://github.com/chris58/TPM.git > > > >On 11 Feb 2013 at 18:46, Christian Steinebach wrote: > > > >> Hi everybody! > >> > >> Is it possible (in isis) to achieve anything like the action > >'Route-This-Cargo' in the dddsample application? > >> > >> If so, could you roughly outline how that behaviour could be > >implemented? > >> I've tried every solution I could imagine and some more, I'm getting > >desperate. > >> > >> Christian > >> > > -- > Sent from my phone with K-9 Mail. Please excuse my brevity. >