You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by ah...@apache.org on 2021/04/09 18:44:56 UTC

[isis] 02/02: ISIS-2063: demo: adding Joda Local Time (no docs, no layout)

This is an automated email from the ASF dual-hosted git repository.

ahuber pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git

commit cccf7c6aafed73de9723d4cc2e1e62aa3969aeea
Author: ahuber@apache.org <ah...@luna>
AuthorDate: Fri Apr 9 20:42:50 2021 +0200

    ISIS-2063: demo: adding Joda Local Time (no docs, no layout)
---
 .../src/main/java/demoapp/dom/menubars.layout.xml  |  1 +
 .../dom/types/jodatime/JodaTimeTypesMenu.java      |  6 ++
 .../jodatime/jodalocaltime/JodaLocalTimes.java     | 82 ++++++++++++++++++++
 .../jodalocaltime/holder/JodaLocalTimeHolder.java  | 37 +++++++++
 .../jodalocaltime/holder/JodaLocalTimeHolder2.java | 74 ++++++++++++++++++
 .../JodaLocalTimeHolder_actionReturning.java       | 39 ++++++++++
 ...aLocalTimeHolder_actionReturningCollection.java | 52 +++++++++++++
 .../holder/JodaLocalTimeHolder_mixinProperty.java  | 41 ++++++++++
 ...lTimeHolder_updateReadOnlyOptionalProperty.java | 54 +++++++++++++
 ...JodaLocalTimeHolder_updateReadOnlyProperty.java | 49 ++++++++++++
 ...meHolder_updateReadOnlyPropertyWithChoices.java | 65 ++++++++++++++++
 .../jodalocaltime/jdo/JodaLocalTimeJdo.java        | 80 ++++++++++++++++++++
 .../jdo/JodaLocalTimeJdoEntities.java              | 44 +++++++++++
 .../jdo/JodaLocalTimeJdoSeedService.java           | 57 ++++++++++++++
 .../samples/JodaLocalTimeSamples.java              | 39 ++++++++++
 .../jodatime/jodalocaltime/vm/JodaLocalTimeVm.java | 88 ++++++++++++++++++++++
 16 files changed, 808 insertions(+)

diff --git a/examples/demo/domain/src/main/java/demoapp/dom/menubars.layout.xml b/examples/demo/domain/src/main/java/demoapp/dom/menubars.layout.xml
index e24e574..c902c7d 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/menubars.layout.xml
+++ b/examples/demo/domain/src/main/java/demoapp/dom/menubars.layout.xml
@@ -195,6 +195,7 @@ For latest we use: https://raw.githubusercontent.com/apache/isis/master/antora/s
                 <mb3:named>JodaTime</mb3:named>
                 <mb3:serviceAction objectType="demo.JodaTimeTypesMenu" id="localDates"/>
                 <mb3:serviceAction objectType="demo.JodaTimeTypesMenu" id="localDateTimes"/>
+                <mb3:serviceAction objectType="demo.JodaTimeTypesMenu" id="localTimes"/>
                 <mb3:serviceAction objectType="demo.JodaTimeTypesMenu" id="dateTimes"/>
             </mb3:section>
         </mb3:menu>
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/jodatime/JodaTimeTypesMenu.java b/examples/demo/domain/src/main/java/demoapp/dom/types/jodatime/JodaTimeTypesMenu.java
index a381e17..4828cfa 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/types/jodatime/JodaTimeTypesMenu.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/jodatime/JodaTimeTypesMenu.java
@@ -31,6 +31,7 @@ import lombok.extern.log4j.Log4j2;
 import demoapp.dom.types.jodatime.jodadatetime.JodaDateTimes;
 import demoapp.dom.types.jodatime.jodalocaldate.JodaLocalDates;
 import demoapp.dom.types.jodatime.jodalocaldatetime.JodaLocalDateTimes;
+import demoapp.dom.types.jodatime.jodalocaltime.JodaLocalTimes;
 
 @DomainService(nature=NatureOfService.VIEW, objectType = "demo.JodaTimeTypesMenu")
 @DomainObjectLayout(named="JodaTimeTypes")
@@ -55,5 +56,10 @@ public class JodaTimeTypesMenu {
         return new JodaLocalDateTimes();
     }
 
+    @Action(semantics = SemanticsOf.SAFE)
+    @ActionLayout(cssClassFa="fa-clock")
+    public JodaLocalTimes localTimes(){
+        return new JodaLocalTimes();
+    }
 
 }
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/jodatime/jodalocaltime/JodaLocalTimes.java b/examples/demo/domain/src/main/java/demoapp/dom/types/jodatime/jodalocaltime/JodaLocalTimes.java
new file mode 100644
index 0000000..68add9c
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/jodatime/jodalocaltime/JodaLocalTimes.java
@@ -0,0 +1,82 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package demoapp.dom.types.jodatime.jodalocaltime;
+
+import java.util.List;
+
+import javax.inject.Inject;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlTransient;
+import javax.xml.bind.annotation.XmlType;
+
+import org.joda.time.LocalTime;
+
+import org.apache.isis.applib.annotation.Action;
+import org.apache.isis.applib.annotation.ActionLayout;
+import org.apache.isis.applib.annotation.Collection;
+import org.apache.isis.applib.annotation.DomainObject;
+import org.apache.isis.applib.annotation.Editing;
+import org.apache.isis.applib.annotation.Nature;
+import org.apache.isis.applib.annotation.PromptStyle;
+import org.apache.isis.applib.annotation.SemanticsOf;
+
+import lombok.extern.log4j.Log4j2;
+
+import demoapp.dom._infra.asciidocdesc.HasAsciiDocDescription;
+import demoapp.dom.types.Samples;
+import demoapp.dom.types.jodatime.jodalocaltime.jdo.JodaLocalTimeJdo;
+import demoapp.dom.types.jodatime.jodalocaltime.jdo.JodaLocalTimeJdoEntities;
+import demoapp.dom.types.jodatime.jodalocaltime.vm.JodaLocalTimeVm;
+
+@XmlRootElement(name = "Demo")
+@XmlType
+@XmlAccessorType(XmlAccessType.FIELD)
+@DomainObject(nature=Nature.VIEW_MODEL, objectType = "demo.JodaLocalTimes", editing=Editing.ENABLED)
+@Log4j2
+public class JodaLocalTimes implements HasAsciiDocDescription {
+
+    public String title() {
+        return "org.joda.time.LocalTime data type";
+    }
+
+    @Action(semantics = SemanticsOf.SAFE)
+    @ActionLayout(promptStyle = PromptStyle.DIALOG_MODAL)
+    public JodaLocalTimeVm openViewModel(org.joda.time.LocalTime initialValue) {
+        return new JodaLocalTimeVm(initialValue);
+    }
+    public org.joda.time.LocalTime default0OpenViewModel() {
+        return samples.single();
+    }
+
+    @Collection
+    public List<JodaLocalTimeJdo> getEntities() {
+        return entities.all();
+    }
+
+    @Inject
+    @XmlTransient
+    JodaLocalTimeJdoEntities entities;
+
+    @Inject
+    @XmlTransient
+    Samples<LocalTime> samples;
+
+}
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/jodatime/jodalocaltime/holder/JodaLocalTimeHolder.java b/examples/demo/domain/src/main/java/demoapp/dom/types/jodatime/jodalocaltime/holder/JodaLocalTimeHolder.java
new file mode 100644
index 0000000..f137757
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/jodatime/jodalocaltime/holder/JodaLocalTimeHolder.java
@@ -0,0 +1,37 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package demoapp.dom.types.jodatime.jodalocaltime.holder;
+
+//tag::class[]
+public interface JodaLocalTimeHolder {
+
+    org.joda.time.LocalTime getReadOnlyProperty();
+    void setReadOnlyProperty(org.joda.time.LocalTime c);
+
+    org.joda.time.LocalTime getReadWriteProperty();
+    void setReadWriteProperty(org.joda.time.LocalTime c);
+
+    org.joda.time.LocalTime getReadOnlyOptionalProperty();
+    void setReadOnlyOptionalProperty(org.joda.time.LocalTime c);
+
+    org.joda.time.LocalTime getReadWriteOptionalProperty();
+    void setReadWriteOptionalProperty(org.joda.time.LocalTime c);
+
+}
+//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/jodatime/jodalocaltime/holder/JodaLocalTimeHolder2.java b/examples/demo/domain/src/main/java/demoapp/dom/types/jodatime/jodalocaltime/holder/JodaLocalTimeHolder2.java
new file mode 100644
index 0000000..f060793
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/jodatime/jodalocaltime/holder/JodaLocalTimeHolder2.java
@@ -0,0 +1,74 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package demoapp.dom.types.jodatime.jodalocaltime.holder;
+
+import org.apache.isis.applib.annotation.LabelPosition;
+import org.apache.isis.applib.annotation.Property;
+import org.apache.isis.applib.annotation.PropertyLayout;
+import org.apache.isis.applib.annotation.Where;
+
+//tag::class[]
+public interface JodaLocalTimeHolder2 extends JodaLocalTimeHolder {
+
+    @Property                                               // <.>
+    @PropertyLayout(
+        labelPosition = LabelPosition.LEFT,                 // <.>
+        describedAs =
+            "@PropertyLayout(labelPosition=LEFT)",
+        hidden = Where.ALL_TABLES, 
+        fieldSetId = "label-positions", sequence = "1")  // <.>
+    default org.joda.time.LocalTime getReadOnlyPropertyDerivedLabelPositionLeft() {
+        return getReadOnlyProperty();
+    }
+
+    @Property
+    @PropertyLayout(
+        labelPosition = LabelPosition.TOP,                  // <.>
+        describedAs =
+            "@PropertyLayout(labelPosition=TOP)",
+        hidden = Where.ALL_TABLES,
+        fieldSetId = "label-positions", sequence = "2")
+    default org.joda.time.LocalTime getReadOnlyPropertyDerivedLabelPositionTop() {
+        return getReadOnlyProperty();
+    }
+
+    @Property
+    @PropertyLayout(
+        labelPosition = LabelPosition.RIGHT,                // <.>
+        describedAs =
+            "@PropertyLayout(labelPosition=RIGHT)",
+        hidden = Where.ALL_TABLES,
+        fieldSetId = "label-positions", sequence = "3")
+    default org.joda.time.LocalTime getReadOnlyPropertyDerivedLabelPositionRight() {
+        return getReadOnlyProperty();
+    }
+
+    @Property
+    @PropertyLayout(
+        labelPosition = LabelPosition.NONE,                 // <.>
+        describedAs =
+            "@PropertyLayout(labelPosition=NONE)",
+        hidden = Where.ALL_TABLES,
+        fieldSetId = "label-positions", sequence = "4")
+    default org.joda.time.LocalTime getReadOnlyPropertyDerivedLabelPositionNone() {
+        return getReadOnlyProperty();
+    }
+
+}
+//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/jodatime/jodalocaltime/holder/JodaLocalTimeHolder_actionReturning.java b/examples/demo/domain/src/main/java/demoapp/dom/types/jodatime/jodalocaltime/holder/JodaLocalTimeHolder_actionReturning.java
new file mode 100644
index 0000000..cca3cc9
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/jodatime/jodalocaltime/holder/JodaLocalTimeHolder_actionReturning.java
@@ -0,0 +1,39 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package demoapp.dom.types.jodatime.jodalocaltime.holder;
+
+import org.apache.isis.applib.annotation.Action;
+import org.apache.isis.applib.annotation.SemanticsOf;
+
+import lombok.RequiredArgsConstructor;
+
+
+//tag::class[]
+@Action(semantics = SemanticsOf.SAFE)
+@RequiredArgsConstructor
+public class JodaLocalTimeHolder_actionReturning {
+
+    private final JodaLocalTimeHolder holder;
+
+    public org.joda.time.LocalTime act() {
+        return holder.getReadOnlyProperty();
+    }
+
+}
+//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/jodatime/jodalocaltime/holder/JodaLocalTimeHolder_actionReturningCollection.java b/examples/demo/domain/src/main/java/demoapp/dom/types/jodatime/jodalocaltime/holder/JodaLocalTimeHolder_actionReturningCollection.java
new file mode 100644
index 0000000..01ae8b9
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/jodatime/jodalocaltime/holder/JodaLocalTimeHolder_actionReturningCollection.java
@@ -0,0 +1,52 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package demoapp.dom.types.jodatime.jodalocaltime.holder;
+
+import java.util.Collection;
+import java.util.stream.Collectors;
+
+import javax.inject.Inject;
+
+import org.joda.time.LocalDateTime;
+
+import org.apache.isis.applib.annotation.Action;
+import org.apache.isis.applib.annotation.SemanticsOf;
+
+import lombok.RequiredArgsConstructor;
+
+import demoapp.dom.types.Samples;
+
+
+//tag::class[]
+@Action(semantics = SemanticsOf.SAFE)
+@RequiredArgsConstructor
+public class JodaLocalTimeHolder_actionReturningCollection {
+
+    private final JodaLocalTimeHolder holder;
+
+    public Collection<org.joda.time.LocalDateTime> act() {
+        return samples.stream()
+                .collect(Collectors.toList());
+    }
+
+    @Inject
+    Samples<LocalDateTime> samples;
+
+}
+//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/jodatime/jodalocaltime/holder/JodaLocalTimeHolder_mixinProperty.java b/examples/demo/domain/src/main/java/demoapp/dom/types/jodatime/jodalocaltime/holder/JodaLocalTimeHolder_mixinProperty.java
new file mode 100644
index 0000000..495b8c7
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/jodatime/jodalocaltime/holder/JodaLocalTimeHolder_mixinProperty.java
@@ -0,0 +1,41 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package demoapp.dom.types.jodatime.jodalocaltime.holder;
+
+import org.apache.isis.applib.annotation.Property;
+import org.apache.isis.applib.annotation.PropertyLayout;
+import org.apache.isis.applib.annotation.Where;
+
+import lombok.RequiredArgsConstructor;
+
+
+//tag::class[]
+@Property()
+@PropertyLayout(hidden = Where.ALL_TABLES, fieldSetId = "contributed", sequence = "1")
+@RequiredArgsConstructor
+public class JodaLocalTimeHolder_mixinProperty {
+
+    private final JodaLocalTimeHolder holder;
+
+    public org.joda.time.LocalTime prop() {
+        return holder.getReadOnlyProperty();
+    }
+
+}
+//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/jodatime/jodalocaltime/holder/JodaLocalTimeHolder_updateReadOnlyOptionalProperty.java b/examples/demo/domain/src/main/java/demoapp/dom/types/jodatime/jodalocaltime/holder/JodaLocalTimeHolder_updateReadOnlyOptionalProperty.java
new file mode 100644
index 0000000..f2b8bc0
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/jodatime/jodalocaltime/holder/JodaLocalTimeHolder_updateReadOnlyOptionalProperty.java
@@ -0,0 +1,54 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package demoapp.dom.types.jodatime.jodalocaltime.holder;
+
+import org.apache.isis.applib.annotation.Action;
+import org.apache.isis.applib.annotation.ActionLayout;
+import org.apache.isis.applib.annotation.Optionality;
+import org.apache.isis.applib.annotation.Parameter;
+import org.apache.isis.applib.annotation.PromptStyle;
+import org.apache.isis.applib.annotation.SemanticsOf;
+
+import lombok.RequiredArgsConstructor;
+
+
+//tag::class[]
+@Action(
+        semantics = SemanticsOf.IDEMPOTENT,
+        associateWith = "readOnlyOptionalProperty"
+)
+@ActionLayout(promptStyle = PromptStyle.INLINE, named = "Update", sequence = "1")
+@RequiredArgsConstructor
+public class JodaLocalTimeHolder_updateReadOnlyOptionalProperty {
+
+    private final JodaLocalTimeHolder holder;
+
+    public JodaLocalTimeHolder act(
+            @Parameter(optionality = Optionality.OPTIONAL)              // <.>
+            org.joda.time.LocalTime newValue
+    ) {
+        holder.setReadOnlyOptionalProperty(newValue);
+        return holder;
+    }
+    public org.joda.time.LocalTime default0Act() {
+        return holder.getReadOnlyOptionalProperty();
+    }
+
+}
+//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/jodatime/jodalocaltime/holder/JodaLocalTimeHolder_updateReadOnlyProperty.java b/examples/demo/domain/src/main/java/demoapp/dom/types/jodatime/jodalocaltime/holder/JodaLocalTimeHolder_updateReadOnlyProperty.java
new file mode 100644
index 0000000..03624a8
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/jodatime/jodalocaltime/holder/JodaLocalTimeHolder_updateReadOnlyProperty.java
@@ -0,0 +1,49 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package demoapp.dom.types.jodatime.jodalocaltime.holder;
+
+import org.apache.isis.applib.annotation.Action;
+import org.apache.isis.applib.annotation.ActionLayout;
+import org.apache.isis.applib.annotation.PromptStyle;
+import org.apache.isis.applib.annotation.SemanticsOf;
+
+import lombok.RequiredArgsConstructor;
+
+
+//tag::class[]
+@Action(
+        semantics = SemanticsOf.IDEMPOTENT,
+        associateWith = "readOnlyProperty"
+)
+@ActionLayout(promptStyle = PromptStyle.INLINE, named = "Update", sequence = "1")
+@RequiredArgsConstructor
+public class JodaLocalTimeHolder_updateReadOnlyProperty {
+
+    private final JodaLocalTimeHolder holder;
+
+    public JodaLocalTimeHolder act(org.joda.time.LocalTime newValue) {
+        holder.setReadOnlyProperty(newValue);
+        return holder;
+    }
+    public org.joda.time.LocalTime default0Act() {
+        return holder.getReadOnlyProperty();
+    }
+
+}
+//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/jodatime/jodalocaltime/holder/JodaLocalTimeHolder_updateReadOnlyPropertyWithChoices.java b/examples/demo/domain/src/main/java/demoapp/dom/types/jodatime/jodalocaltime/holder/JodaLocalTimeHolder_updateReadOnlyPropertyWithChoices.java
new file mode 100644
index 0000000..9d2c12f
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/jodatime/jodalocaltime/holder/JodaLocalTimeHolder_updateReadOnlyPropertyWithChoices.java
@@ -0,0 +1,65 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package demoapp.dom.types.jodatime.jodalocaltime.holder;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+import javax.inject.Inject;
+
+import org.joda.time.LocalTime;
+
+import org.apache.isis.applib.annotation.Action;
+import org.apache.isis.applib.annotation.ActionLayout;
+import org.apache.isis.applib.annotation.PromptStyle;
+import org.apache.isis.applib.annotation.SemanticsOf;
+
+import lombok.RequiredArgsConstructor;
+
+import demoapp.dom.types.Samples;
+
+
+//tag::class[]
+@Action(
+        semantics = SemanticsOf.IDEMPOTENT,
+        associateWith = "readOnlyProperty"
+)
+@ActionLayout(promptStyle = PromptStyle.INLINE, named = "Update with choices", sequence = "2")
+@RequiredArgsConstructor
+public class JodaLocalTimeHolder_updateReadOnlyPropertyWithChoices {
+
+    private final JodaLocalTimeHolder holder;
+
+    public JodaLocalTimeHolder act(org.joda.time.LocalTime newValue) {
+        holder.setReadOnlyProperty(newValue);
+        return holder;
+    }
+    public org.joda.time.LocalTime default0Act() {
+        return holder.getReadOnlyProperty();
+    }
+    public List<org.joda.time.LocalTime> choices0Act() {
+        return samples.stream()
+                .collect(Collectors.toList());
+    }
+
+    @Inject
+    Samples<LocalTime> samples;
+
+}
+//end::class[]
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/jodatime/jodalocaltime/jdo/JodaLocalTimeJdo.java b/examples/demo/domain/src/main/java/demoapp/dom/types/jodatime/jodalocaltime/jdo/JodaLocalTimeJdo.java
new file mode 100644
index 0000000..8fbb2cc
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/jodatime/jodalocaltime/jdo/JodaLocalTimeJdo.java
@@ -0,0 +1,80 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package demoapp.dom.types.jodatime.jodalocaltime.jdo;
+
+import javax.jdo.annotations.Column;
+import javax.jdo.annotations.DatastoreIdentity;
+import javax.jdo.annotations.IdGeneratorStrategy;
+import javax.jdo.annotations.IdentityType;
+import javax.jdo.annotations.PersistenceCapable;
+
+import org.apache.isis.applib.annotation.DomainObject;
+import org.apache.isis.applib.annotation.Editing;
+import org.apache.isis.applib.annotation.Optionality;
+import org.apache.isis.applib.annotation.Property;
+import org.apache.isis.applib.annotation.PropertyLayout;
+import org.apache.isis.applib.annotation.Title;
+
+import demoapp.dom._infra.asciidocdesc.HasAsciiDocDescription;
+import demoapp.dom.types.jodatime.jodalocaltime.holder.JodaLocalTimeHolder2;
+import lombok.Getter;
+import lombok.Setter;
+
+//tag::class[]
+@PersistenceCapable(identityType = IdentityType.DATASTORE, schema = "demo")
+@DatastoreIdentity(strategy = IdGeneratorStrategy.IDENTITY, column = "id")
+@DomainObject(
+      objectType = "demo.JodaLocalTimeJdo"
+)
+public class JodaLocalTimeJdo                                          // <.>
+      implements HasAsciiDocDescription, JodaLocalTimeHolder2 {
+
+//end::class[]
+  public JodaLocalTimeJdo(org.joda.time.LocalTime initialValue) {
+      this.readOnlyProperty = initialValue;
+      this.readWriteProperty = initialValue;
+  }
+
+//tag::class[]
+  @Title(prepend = "org.joda.time.LocalTime JDO entity: ")
+  @PropertyLayout(fieldSetId = "read-only-properties", sequence = "1")
+  @Column(allowsNull = "false")                                               // <.>
+  @Getter @Setter
+  private org.joda.time.LocalTime readOnlyProperty;
+
+  @Property(editing = Editing.ENABLED)                                        // <.>
+  @PropertyLayout(fieldSetId = "editable-properties", sequence = "1")
+  @Column(allowsNull = "false")
+  @Getter @Setter
+  private org.joda.time.LocalTime readWriteProperty;
+
+  @Property(optionality = Optionality.OPTIONAL)                               // <.>
+  @PropertyLayout(fieldSetId = "optional-properties", sequence = "1")
+  @Column(allowsNull = "true")                                                // <.>
+  @Getter @Setter
+  private org.joda.time.LocalTime readOnlyOptionalProperty;
+
+  @Property(editing = Editing.ENABLED, optionality = Optionality.OPTIONAL)
+  @PropertyLayout(fieldSetId = "optional-properties", sequence = "2")
+  @Column(allowsNull = "true")
+  @Getter @Setter
+  private org.joda.time.LocalTime readWriteOptionalProperty;
+
+}
+//end::class[]
\ No newline at end of file
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/jodatime/jodalocaltime/jdo/JodaLocalTimeJdoEntities.java b/examples/demo/domain/src/main/java/demoapp/dom/types/jodatime/jodalocaltime/jdo/JodaLocalTimeJdoEntities.java
new file mode 100644
index 0000000..543da82
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/jodatime/jodalocaltime/jdo/JodaLocalTimeJdoEntities.java
@@ -0,0 +1,44 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package demoapp.dom.types.jodatime.jodalocaltime.jdo;
+
+import java.util.List;
+import java.util.Optional;
+
+import javax.inject.Inject;
+
+import org.springframework.stereotype.Service;
+
+import org.apache.isis.applib.services.repository.RepositoryService;
+
+@Service
+public class JodaLocalTimeJdoEntities {
+
+    public Optional<JodaLocalTimeJdo> find(final org.joda.time.LocalTime readOnlyProperty) {
+        return repositoryService.firstMatch(JodaLocalTimeJdo.class, x -> x.getReadOnlyProperty().equals(readOnlyProperty));
+    }
+
+    public List<JodaLocalTimeJdo> all() {
+        return repositoryService.allInstances(JodaLocalTimeJdo.class);
+    }
+
+    @Inject
+    RepositoryService repositoryService;
+
+}
\ No newline at end of file
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/jodatime/jodalocaltime/jdo/JodaLocalTimeJdoSeedService.java b/examples/demo/domain/src/main/java/demoapp/dom/types/jodatime/jodalocaltime/jdo/JodaLocalTimeJdoSeedService.java
new file mode 100644
index 0000000..deef7d3
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/jodatime/jodalocaltime/jdo/JodaLocalTimeJdoSeedService.java
@@ -0,0 +1,57 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package demoapp.dom.types.jodatime.jodalocaltime.jdo;
+
+import javax.inject.Inject;
+
+import org.joda.time.LocalTime;
+import org.springframework.stereotype.Service;
+
+import org.apache.isis.applib.services.repository.RepositoryService;
+import org.apache.isis.testing.fixtures.applib.fixturescripts.FixtureScript;
+
+import demoapp.dom._infra.seed.SeedServiceAbstract;
+import demoapp.dom.types.Samples;
+
+@Service
+public class JodaLocalTimeJdoSeedService extends SeedServiceAbstract {
+
+    public JodaLocalTimeJdoSeedService() {
+        super(JodaLocalTimeJdoEntityFixture::new);
+    }
+
+    static class JodaLocalTimeJdoEntityFixture extends FixtureScript {
+
+        @Override
+        protected void execute(ExecutionContext executionContext) {
+            samples.stream()
+                    .map(JodaLocalTimeJdo::new)
+                    .forEach(domainObject -> {
+                        repositoryService.persist(domainObject);
+                        executionContext.addResult(this, domainObject);
+                    });
+        }
+
+        @Inject
+        RepositoryService repositoryService;
+
+        @Inject
+        Samples<LocalTime> samples;
+    }
+}
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/jodatime/jodalocaltime/samples/JodaLocalTimeSamples.java b/examples/demo/domain/src/main/java/demoapp/dom/types/jodatime/jodalocaltime/samples/JodaLocalTimeSamples.java
new file mode 100644
index 0000000..d9048ad
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/jodatime/jodalocaltime/samples/JodaLocalTimeSamples.java
@@ -0,0 +1,39 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package demoapp.dom.types.jodatime.jodalocaltime.samples;
+
+import java.util.stream.Stream;
+
+import org.joda.time.LocalTime;
+import org.springframework.stereotype.Service;
+
+import demoapp.dom.types.Samples;
+
+@Service
+public class JodaLocalTimeSamples implements Samples<LocalTime> {
+
+    @Override
+    public Stream<LocalTime> stream() {
+        return Stream.of(0, 8)
+                .flatMap(hour -> 
+                    Stream.of(0, 15)
+                        .map(minute -> new org.joda.time.LocalTime(hour, minute, 30)));
+    }
+
+}
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/types/jodatime/jodalocaltime/vm/JodaLocalTimeVm.java b/examples/demo/domain/src/main/java/demoapp/dom/types/jodatime/jodalocaltime/vm/JodaLocalTimeVm.java
new file mode 100644
index 0000000..2e3dbed
--- /dev/null
+++ b/examples/demo/domain/src/main/java/demoapp/dom/types/jodatime/jodalocaltime/vm/JodaLocalTimeVm.java
@@ -0,0 +1,88 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *        http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+package demoapp.dom.types.jodatime.jodalocaltime.vm;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+import org.apache.isis.applib.annotation.DomainObject;
+import org.apache.isis.applib.annotation.Editing;
+import org.apache.isis.applib.annotation.Nature;
+import org.apache.isis.applib.annotation.Optionality;
+import org.apache.isis.applib.annotation.Property;
+import org.apache.isis.applib.annotation.PropertyLayout;
+import org.apache.isis.applib.annotation.Title;
+import org.apache.isis.applib.jaxb.JodaTimeJaxbAdapters;
+
+import demoapp.dom._infra.asciidocdesc.HasAsciiDocDescription;
+import demoapp.dom.types.jodatime.jodalocaltime.holder.JodaLocalTimeHolder2;
+import lombok.Getter;
+import lombok.Setter;
+
+//tag::class[]
+@XmlRootElement(name = "root")
+@XmlType
+@XmlAccessorType(XmlAccessType.FIELD)
+@DomainObject(
+      nature=Nature.VIEW_MODEL,
+      objectType = "demo.JodaLocalTimeVm"
+)
+@lombok.NoArgsConstructor                                                       // <.>
+public class JodaLocalTimeVm
+      implements HasAsciiDocDescription, JodaLocalTimeHolder2 {
+
+//end::class[]
+  public JodaLocalTimeVm(org.joda.time.LocalTime initialValue) {
+      this.readOnlyProperty = initialValue;
+      this.readWriteProperty = initialValue;
+  }
+
+//tag::class[]
+  @Title(prepend = "org.joda.time.LocalTime view model: ")
+  @PropertyLayout(fieldSetId = "read-only-properties", sequence = "1")
+  @XmlElement(required = true)                                                // <.>
+  @XmlJavaTypeAdapter(JodaTimeJaxbAdapters.LocalTimeToStringAdapter.class)    // <.>
+  @Getter @Setter
+  private org.joda.time.LocalTime readOnlyProperty;
+
+  @Property(editing = Editing.ENABLED)                                        // <.>
+  @PropertyLayout(fieldSetId = "editable-properties", sequence = "1")
+  @XmlElement(required = true)
+  @XmlJavaTypeAdapter(JodaTimeJaxbAdapters.LocalTimeToStringAdapter.class)
+  @Getter @Setter
+  private org.joda.time.LocalTime readWriteProperty;
+
+  @Property(optionality = Optionality.OPTIONAL)                               // <.>
+  @PropertyLayout(fieldSetId = "optional-properties", sequence = "1")
+  @XmlJavaTypeAdapter(JodaTimeJaxbAdapters.LocalTimeToStringAdapter.class)
+  @Getter @Setter
+  private org.joda.time.LocalTime readOnlyOptionalProperty;
+
+  @Property(editing = Editing.ENABLED, optionality = Optionality.OPTIONAL)
+  @PropertyLayout(fieldSetId = "optional-properties", sequence = "2")
+  @XmlJavaTypeAdapter(JodaTimeJaxbAdapters.LocalTimeToStringAdapter.class)
+  @Getter @Setter
+  private org.joda.time.LocalTime readWriteOptionalProperty;
+
+}
+//end::class[]