You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2019/01/11 15:48:16 UTC

[isis] 01/02: Merge branch 'master' into v2

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

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

commit 458db0c40403e2e19ba7ce9586007cccee670994
Merge: 1dd23cb a40ef6a
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Fri Jan 11 15:28:47 2019 +0000

    Merge branch 'master' into v2

 .../rgant/_rgant-ActionLayout_bookmarking.adoc     | 10 ++-
 .../guides/rgant/_rgant-ActionLayout_named.adoc    |  1 +
 .../guides/rgant/_rgant-Action_domainEvent.adoc    |  9 ++-
 .../guides/rgant/_rgant-Action_publishing.adoc     | 15 ++++-
 .../rgant/_rgant-CollectionLayout_cssClass.adoc    |  8 ++-
 .../rgant/_rgant-CollectionLayout_named.adoc       |  1 +
 .../rgant/_rgant-Collection_domainEvent.adoc       | 10 ++-
 .../rgant/_rgant-Collection_notPersisted.adoc      |  8 ++-
 .../rgant/_rgant-DomainObject_publishing.adoc      | 30 ++++++++-
 .../rgant/_rgant-DomainServiceLayout_named.adoc    |  3 +-
 .../guides/rgant/_rgant-ParameterLayout.adoc       |  6 +-
 ..._rgant-ParameterLayout_renderedAsDayBefore.adoc | 11 +++-
 .../_rgant-ParameterLayout_typicalLength.adoc      |  7 +-
 .../asciidoc/guides/rgant/_rgant-Property.adoc     | 15 +++++
 .../_rgant-PropertyLayout_renderedAsDayBefore.adoc | 13 +++-
 .../rgant/_rgant-PropertyLayout_typicalLength.adoc |  7 +-
 .../guides/rgant/_rgant-Property_domainEvent.adoc  |  9 ++-
 .../guides/rgant/_rgant-Property_fileAccept.adoc   |  5 +-
 .../guides/rgant/_rgant-Property_hidden.adoc       | 18 +++---
 .../guides/rgant/_rgant-Property_mustSatisfy.adoc  |  6 +-
 .../guides/rgant/_rgant-Property_notPersisted.adoc | 14 +++-
 .../guides/rgant/_rgant-Property_optionality.adoc  | 28 +++++---
 .../guides/rgant/_rgant-Property_projecting.adoc   | 39 ++++++++++++
 .../guides/rgant/_rgant-Property_publishing.adoc   | 17 ++++-
 .../apache/isis/applib/annotation/Projecting.java  | 31 +++++++++
 .../apache/isis/applib/annotation/Property.java    | 15 +++++
 .../members/cssclass/CssClassFacetAbstract2.java   | 39 ++++++++++++
 .../facets/object/projection/ProjectionFacet.java  | 29 +++++++++
 .../object/projection/ProjectionFacetAbstract.java | 42 ++++++++++++
 .../ProjectionFacetFromProjectingProperty.java     | 74 ++++++++++++++++++++++
 .../CssClassFacetDerivedFromProjectionFacet.java   | 52 +++++++++++++++
 .../ident/IconFacetDerivedFromProjectionFacet.java | 50 +++++++++++++++
 .../TitleFacetDerivedFromProjectionFacet.java      | 50 +++++++++++++++
 .../properties/projection/ProjectingFacet.java     | 29 +++++++++
 .../projection/ProjectingFacetAbstract.java        | 41 ++++++++++++
 .../ProjectingFacetFromPropertyAnnotation.java     | 62 ++++++++++++++++++
 .../property/PropertyAnnotationFacetFactory.java   | 17 +++++
 .../param/DeriveFacetsPostProcessor.java           | 31 +++++++++
 .../specimpl/ObjectSpecificationAbstract.java      |  1 +
 .../entity/icontitle/EntityIconAndTitlePanel.java  | 50 ++++++++++++---
 .../modules/simple/dom/impl/SimpleObject.java      |  3 +
 41 files changed, 845 insertions(+), 61 deletions(-)

diff --cc adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-Action_publishing.adoc
index a99320b,92dbcc2..a702ff6
--- a/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-Action_publishing.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-Action_publishing.adoc
@@@ -7,8 -7,7 +7,7 @@@
  
  
  
- The `publishing()` attribute determines whether and how an action invocation is published via the registered implementation of a xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublisherService[`PublisherService`]) or xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublisherService[`PublisherService`].
- This attribute is also supported for xref:../rgant/rgant.adoc#_rgant-DomainObject_publishing[domain objects], where it controls whether changed objects are published as events, and for xref:../rgant/rgant.adoc#_rgant-Property_publishing[`@Property#publishing()`], where it controls whether property edits are published as events.
 -The `publishing()` attribute determines whether and how an action invocation is published via the registered implementation of a xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublishingService[`PublishingService`]) or xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublisherService[`PublisherService`].
++The `publishing()` attribute determines whether and how an action invocation is published via the registered implementation of xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublisherService[`PublisherService`].
  
  A common use case is to notify external "downstream" systems of changes in the state of the Apache Isis application.
  The default value for the attribute is `AS_CONFIGURED`, meaning that the xref:../rgcfg/rgcfg.adoc#_rgcfg_configuring-core[configuration property] `isis.services.publish.actions` is used to determine the whether the action is published:
@@@ -43,4 -42,31 +42,16 @@@ public class Order 
  
  
  
 -== `publishingPayloadFactory()`
 -
 -The (optional) related `publishingPayloadFactory()` specifies the class to use to create the (payload of the) event to be published by the publishing factory.
 -
 -Rather than simply broadcast that the action was invoked, the payload factory allows a "fatter" payload to be instantiated that can eagerly push commonly-required information to all subscribers.
 -For at least some subscribers this should avoid the necessity to query back for additional information.
 -
 -[WARNING]
 -====
 -Be aware that this attribute is only honoured by the (deprecated) xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublishingService[`PublishingService`], so should itself be considered as deprecated.
 -It is ignored by the replacement xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublisherService[`PublisherService`],
 -====
 -
 -
 -
  
+ == See also
+ 
+ This attribute is also supported for:
+ 
+ * xref:../rgant/rgant.adoc#_rgant-DomainObject_publishing[domain objects]
+ + where it controls whether changed objects are published as events, and for
+ 
+ * xref:../rgant/rgant.adoc#_rgant-Property_publishing[properties]
+ +
+ where it controls whether property edits are published as events.
+ 
+ 
diff --cc adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-DomainObject_publishing.adoc
index 6bd18c2,a171f6c..fbfafe4
--- a/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-DomainObject_publishing.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-DomainObject_publishing.adoc
@@@ -6,8 -6,8 +6,7 @@@
  
  
  
 -The `publishing()` attribute determines whether and how a modified object instance is published via the registered implementation of a xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublishingService[`PublishingService`]) or xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublisherService[`PublisherService`].
 -
 +The `publishing()` attribute determines whether and how a modified object instance is published via the registered implementation of xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublisherService[`PublisherService`].
- This attribute is also supported for xref:../rgant/rgant.adoc#_rgant-Action_publishing[actions], where it controls whether action invocations are published as events, and for xref:../rgant/rgant.adoc#_rgant-Property_publishing[`@Property#publishing()`], where it controls whether property edits are published as events.
  
  A common use case is to notify external "downstream" systems of changes in the state of the Apache Isis application.
  
@@@ -41,3 -41,29 +40,32 @@@ public class InterestRate 
  
  
  
++<<<<<<< HEAD
++=======
+ == `publishingPayloadFactory()`
+ 
+ The (optional) related `publishingPayloadFactory()` specifies the class to use to create the (payload of the) event to be published by the publishing factory.
+ 
+ Rather than simply broadcast that the object was changed, the payload factory allows a "fatter" payload to be instantiated that can eagerly push commonly-required information to all subscribers.
+ For at least some subscribers this should avoid the necessity to query back for additional information.
+ 
+ 
+ [WARNING]
+ ====
+ Be aware that this attribute is only honoured by the (deprecated) xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublishingService[`PublishingService`], so should itself be considered as deprecated.
+ It is ignored by the replacement xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublisherService[`PublisherService`],
+ ====
+ 
+ 
+ == See also
+ 
+ This attribute is also supported for:
+ 
+ * xref:../rgant/rgant.adoc#_rgant-Action_publishing[actions]
+ +
+ where it controls whether action invocations are published as events, and for
+ 
+ * xref:../rgant/rgant.adoc#_rgant-Property_publishing[properties]
+ +
+ where it controls whether property edits are published as events.
++>>>>>>> master
diff --cc adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-Property_publishing.adoc
index 6181905,17a1eef..58c9c6f
--- a/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-Property_publishing.adoc
+++ b/adocs/documentation/src/main/asciidoc/guides/rgant/_rgant-Property_publishing.adoc
@@@ -7,8 -7,7 +7,7 @@@
  
  
  
 -The `publishing()` attribute determines whether and how a property edit is published via the registered implementation of a xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublishingService[`PublishingService`]) or xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublisherService[`PublisherService`].
 +The `publishing()` attribute determines whether and how a property edit is published via the registered implementation of xref:../rgsvc/rgsvc.adoc#_rgsvc_persistence-layer-spi_PublisherService[`PublisherService`].
- This attribute is also supported for xref:../rgant/rgant.adoc#_rgant-DomainObject_publishing[domain objects], where it controls whether changed objects are published as events, and for xref:../rgant/rgant.adoc#_rgant-Property_publishing[`@Property#publishing()`], where it controls whether property edits are published as events.
  
  A common use case is to notify external "downstream" systems of changes in the state of the Apache Isis application.
  The default value for the attribute is `AS_CONFIGURED`, meaning that the
diff --cc core/applib/src/main/java/org/apache/isis/applib/annotation/Property.java
index a587546,98ad773..44999b3
--- a/core/applib/src/main/java/org/apache/isis/applib/annotation/Property.java
+++ b/core/applib/src/main/java/org/apache/isis/applib/annotation/Property.java
@@@ -73,8 -73,23 +73,23 @@@ public @interface Property 
      /**
       * Indicates where the property is not visible to the user.
       */
 -    Where hidden() default Where.NOWHERE;
 +    Where hidden() default Where.NOT_SPECIFIED;
  
+     /**
+      * If set to {@link Projecting#PROJECTED projected}, then indicates that the owner of this property is a view model
+      * which is a projection of some other entity, and that the property holds a reference to that
+      * &quot;underlying&quot;.
+      *
+      * <p>
+      *     This is used to automatically redirect any bookmarks to the view model (projection) to instead be directed
+      *     at the underlying entity.
+      * </p>
+      *
+      * <p>
+      *     Only one such property should be marked as being a projection with a view model.
+      * </p>
+      */
+     Projecting projecting() default Projecting.NOT_SPECIFIED;
  
  
  
diff --cc core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/PropertyAnnotationFacetFactory.java
index 6535902,2d116a1..4e40191
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/PropertyAnnotationFacetFactory.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/facets/properties/property/PropertyAnnotationFacetFactory.java
@@@ -44,14 -54,22 +44,16 @@@ import org.apache.isis.core.metamodel.f
  import org.apache.isis.core.metamodel.facets.objectvalue.mandatory.MandatoryFacet;
  import org.apache.isis.core.metamodel.facets.objectvalue.maxlen.MaxLengthFacet;
  import org.apache.isis.core.metamodel.facets.objectvalue.regex.RegExFacet;
 -import org.apache.isis.core.metamodel.facets.objectvalue.regex.TitleFacetFormattedByRegex;
  import org.apache.isis.core.metamodel.facets.propcoll.accessor.PropertyOrCollectionAccessorFacet;
  import org.apache.isis.core.metamodel.facets.propcoll.notpersisted.NotPersistedFacet;
+ import org.apache.isis.core.metamodel.facets.properties.projection.ProjectingFacet;
+ import org.apache.isis.core.metamodel.facets.properties.projection.ProjectingFacetFromPropertyAnnotation;
  import org.apache.isis.core.metamodel.facets.properties.property.command.CommandFacetForPropertyAnnotation;
 -import org.apache.isis.core.metamodel.facets.properties.property.disabled.DisabledFacetForDisabledAnnotationOnProperty;
  import org.apache.isis.core.metamodel.facets.properties.property.disabled.DisabledFacetForPropertyAnnotation;
  import org.apache.isis.core.metamodel.facets.properties.property.fileaccept.FileAcceptFacetForPropertyAnnotation;
 -import org.apache.isis.core.metamodel.facets.properties.property.hidden.HiddenFacetForHiddenAnnotationOnProperty;
  import org.apache.isis.core.metamodel.facets.properties.property.hidden.HiddenFacetForPropertyAnnotation;
 -import org.apache.isis.core.metamodel.facets.properties.property.mandatory.MandatoryFacetForMandatoryAnnotationOnProperty;
  import org.apache.isis.core.metamodel.facets.properties.property.mandatory.MandatoryFacetForPropertyAnnotation;
  import org.apache.isis.core.metamodel.facets.properties.property.mandatory.MandatoryFacetInvertedByNullableAnnotationOnProperty;
 -import org.apache.isis.core.metamodel.facets.properties.property.mandatory.MandatoryFacetInvertedByOptionalAnnotationOnProperty;
 -import org.apache.isis.core.metamodel.facets.properties.property.maxlength.MaxLengthFacetForMaxLengthAnnotationOnProperty;
  import org.apache.isis.core.metamodel.facets.properties.property.maxlength.MaxLengthFacetForPropertyAnnotation;
  import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertyClearFacetForDomainEventFromDefault;
  import org.apache.isis.core.metamodel.facets.properties.property.modify.PropertyClearFacetForDomainEventFromPropertyAnnotation;
diff --cc core/metamodel/src/main/java/org/apache/isis/core/metamodel/postprocessors/param/DeriveFacetsPostProcessor.java
index d1e3049,a7808b4..6926507
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/postprocessors/param/DeriveFacetsPostProcessor.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/postprocessors/param/DeriveFacetsPostProcessor.java
@@@ -221,10 -231,36 +228,34 @@@ public class DeriveFacetsPostProcessor 
                  for (final ObjectActionParameter scalarParam : compatibleScalarParams) {
                      addCollectionParamChoicesFacetIfNoneAlready(collection, scalarParam);
                  }
 -            }
 -
 +            });
              deriveCollectionDomainEventForMixins(objectSpecification, collection);
 -        }
 -
 +        });
+         deriveProjectionFacets(objectSpecification);
+     }
+ 
+     private void deriveProjectionFacets(final ObjectSpecification objectSpecification) {
+         final ProjectionFacet projectionFacet = ProjectionFacetFromProjectingProperty.create(objectSpecification);
+         if (projectionFacet == null) {
+             return;
+         }
+         FacetUtil.addFacet(projectionFacet);
+         final TitleFacet titleFacet = objectSpecification.getFacet(TitleFacet.class);
+         if(canOverwrite(titleFacet)) {
+             FacetUtil.addFacet(new TitleFacetDerivedFromProjectionFacet(projectionFacet, objectSpecification));
+         }
+         final IconFacet iconFacet = objectSpecification.getFacet(IconFacet.class);
+         if(canOverwrite(iconFacet)) {
+             FacetUtil.addFacet(new IconFacetDerivedFromProjectionFacet(projectionFacet, objectSpecification));
+         }
+         final CssClassFacet cssClassFacet = objectSpecification.getFacet(CssClassFacet.class);
+         if(canOverwrite(cssClassFacet)) {
+             FacetUtil.addFacet(new IconFacetDerivedFromProjectionFacet(projectionFacet, objectSpecification));
+         }
+     }
  
+     private static boolean canOverwrite(final Facet facet) {
+         return facet == null || facet.isNoop() || facet.isDerived();
      }
  
      private void tweakActionDomainEventForMixin(
diff --cc core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectSpecificationAbstract.java
index e1c1c67,b270fc8..00885b3
--- a/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectSpecificationAbstract.java
+++ b/core/metamodel/src/main/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectSpecificationAbstract.java
@@@ -352,8 -371,30 +352,9 @@@ public abstract class ObjectSpecificati
  
      protected void postProcess() {
          postProcessor.postProcess(this);
+         updateFromFacetValues();
      }
 -    //endregion
  
 -    //region > Title, Icon
 -
 -    @Override
 -    public String getTitle(final ObjectAdapter targetAdapter) {
 -        return getTitle(null, targetAdapter);
 -    }
  
      @Override
      public String getTitle(
diff --cc core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/icontitle/EntityIconAndTitlePanel.java
index a216e91,d61a27b..0d33439
--- a/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/icontitle/EntityIconAndTitlePanel.java
+++ b/core/viewer-wicket-ui/src/main/java/org/apache/isis/viewer/wicket/ui/components/entity/icontitle/EntityIconAndTitlePanel.java
@@@ -19,7 -19,11 +19,12 @@@
  
  package org.apache.isis.viewer.wicket.ui.components.entity.icontitle;
  
 +import org.apache.wicket.Page;
+ import java.util.concurrent.Callable;
+ 
+ import org.apache.wicket.AttributeModifier;
+ import org.apache.wicket.ajax.AjaxRequestTarget;
+ import org.apache.wicket.ajax.markup.html.AjaxLink;
  import org.apache.wicket.markup.html.WebMarkupContainer;
  import org.apache.wicket.markup.html.basic.Label;
  import org.apache.wicket.markup.html.image.Image;
@@@ -29,8 -32,11 +33,10 @@@ import org.apache.wicket.request.cycle.
  import org.apache.wicket.request.resource.ResourceReference;
  
  import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 -import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager;
 -import org.apache.isis.core.metamodel.adapter.mgr.AdapterManager.ConcurrencyChecking;
 +import org.apache.isis.core.metamodel.adapter.concurrency.ConcurrencyChecking;
  import org.apache.isis.core.metamodel.facets.members.cssclassfa.CssClassFaFacet;
+ import org.apache.isis.core.metamodel.facets.object.projection.ProjectionFacet;
+ import org.apache.isis.core.metamodel.spec.ObjectSpecification;
  import org.apache.isis.core.runtime.system.session.IsisSessionFactory;
  import org.apache.isis.viewer.wicket.model.isis.WicketViewerSettings;
  import org.apache.isis.viewer.wicket.model.mementos.ObjectAdapterMemento;
@@@ -146,12 -151,40 +152,36 @@@ public class EntityIconAndTitlePanel ex
      }
  
      private AbstractLink createDynamicallyVisibleLink() {
-         final PageParameters pageParameters = getModel().getPageParametersWithoutUiHints();
  
-         final Class<? extends Page> pageClass = getPageClassRegistry().getPageClass(PageType.ENTITY);
+         final ObjectAdapterModel entityModel = getModel();
+         return new AjaxLink<Void>(ID_ENTITY_LINK) {
+             @Override
+             public void onClick(final AjaxRequestTarget ajaxRequestTarget) {
+ 
+                 final ObjectAdapter targetAdapter = entityModel.getObject();
+                 final ObjectSpecification objectSpecification = targetAdapter.getSpecification();
+                 final ProjectionFacet projectionFacet = objectSpecification.getFacet(ProjectionFacet.class);
+ 
+                 final ObjectAdapter redirectToAdapter =
+                         projectionFacet != null ? projectionFacet.projected(targetAdapter) : targetAdapter;
+ 
+                 final EntityPage entityPage =
+ 
+                         // disabling concurrency checking after the layout XML (grid) feature
+                         // was throwing an exception when rebuild grid after invoking action
+                         // not certain why that would be the case, but think it should be
+                         // safe to simply disable while recreating the page to re-render back to user.
 -                        AdapterManager.ConcurrencyChecking.executeWithConcurrencyCheckingDisabled(
 -                                new Callable<EntityPage>() {
 -                                    @Override public EntityPage call() throws Exception {
 -                                        return new EntityPage(redirectToAdapter, null);
 -                                    }
 -                                }
++                        ConcurrencyChecking.executeWithConcurrencyCheckingDisabled(
++                                () -> new EntityPage(redirectToAdapter, null)
+                         );
  
-         return new BookmarkablePageLink<Void>(ID_ENTITY_LINK, pageClass, pageParameters) {
-             private static final long serialVersionUID = 1L;
+                 getIsisSessionFactory().getCurrentSession().getPersistenceSession().getTransactionManager().flushTransaction();
+ 
+                 // "redirect-after-post"
+                 final RequestCycle requestCycle = RequestCycle.get();
+                 requestCycle.setResponsePage(entityPage);
+ 
+             }
  
              @Override
              public boolean isVisible() {
diff --cc example/application/simpleapp/module-simple/src/main/java/domainapp/modules/simple/dom/impl/SimpleObject.java
index bcc75ee,098da24..87c3db5
--- a/example/application/simpleapp/module-simple/src/main/java/domainapp/modules/simple/dom/impl/SimpleObject.java
+++ b/example/application/simpleapp/module-simple/src/main/java/domainapp/modules/simple/dom/impl/SimpleObject.java
@@@ -18,9 -18,9 +18,10 @@@
   */
  package domainapp.modules.simple.dom.impl;
  
 +import javax.jdo.annotations.IdGeneratorStrategy;
  import javax.jdo.annotations.IdentityType;
  import javax.jdo.annotations.VersionStrategy;
+ import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
  
  import com.google.common.collect.ComparisonChain;
  
@@@ -32,9 -36,11 +33,10 @@@ import org.apache.isis.applib.annotatio
  import org.apache.isis.applib.services.message.MessageService;
  import org.apache.isis.applib.services.repository.RepositoryService;
  import org.apache.isis.applib.services.title.TitleService;
+ import org.apache.isis.schema.utils.jaxbadapters.PersistentEntityAdapter;
  
 -import lombok.AccessLevel;
 +import domainapp.modules.simple.dom.types.Name;
 +import domainapp.modules.simple.dom.types.Notes;
  import static org.apache.isis.applib.annotation.CommandReification.ENABLED;
  import static org.apache.isis.applib.annotation.SemanticsOf.IDEMPOTENT;
  import static org.apache.isis.applib.annotation.SemanticsOf.NON_IDEMPOTENT_ARE_YOU_SURE;
@@@ -45,18 -51,20 +47,19 @@@
  @javax.jdo.annotations.Unique(name="SimpleObject_name_UNQ", members = {"name"})
  @DomainObject(auditing = Auditing.ENABLED)
  @DomainObjectLayout()  // causes UI events to be triggered
 -@lombok.Getter @lombok.Setter
  @lombok.RequiredArgsConstructor
+ @XmlJavaTypeAdapter(PersistentEntityAdapter.class)
  public class SimpleObject implements Comparable<SimpleObject> {
  
 -    @javax.jdo.annotations.Column(allowsNull = "false", length = 40)
 -    @lombok.NonNull
 -    @Property() // editing disabled by default, see isis.properties
 -    @Title(prepend = "Object: ")
 -    private String name;
 +    public String title() {
 +        return "Object: " + getName();
 +    }
 +
 +    @lombok.Getter @lombok.Setter @lombok.NonNull
 +    @Name private String name;
  
 -    @javax.jdo.annotations.Column(allowsNull = "true", length = 4000)
 -    @Property(editing = Editing.ENABLED)
 -    private String notes;
 +    @lombok.Getter @lombok.Setter
 +    @Notes private String notes;
  
  
      @Action(semantics = IDEMPOTENT, command = ENABLED, publishing = Publishing.ENABLED, associateWith = "name")