You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@causeway.apache.org by da...@apache.org on 2023/09/19 07:41:22 UTC

[causeway] 03/04: CAUSEWAY-3577 : makes Object_objectIdentifier picked up as a property mixin, rather than an action.

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

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

commit ef9a48f87f4c53bfcc6cb8e31cd551e05e32eb99
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Tue Sep 19 06:50:33 2023 +0100

    CAUSEWAY-3577 : makes Object_objectIdentifier picked up as a property mixin, rather than an action.
---
 .../applib/mixins/metamodel/Object_objectIdentifier.java    | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/api/applib/src/main/java/org/apache/causeway/applib/mixins/metamodel/Object_objectIdentifier.java b/api/applib/src/main/java/org/apache/causeway/applib/mixins/metamodel/Object_objectIdentifier.java
index 9a40fd08eb..9ca8b64b29 100644
--- a/api/applib/src/main/java/org/apache/causeway/applib/mixins/metamodel/Object_objectIdentifier.java
+++ b/api/applib/src/main/java/org/apache/causeway/applib/mixins/metamodel/Object_objectIdentifier.java
@@ -35,7 +35,7 @@ import lombok.val;
 
 /**
  * Contributes a property exposing the internal identifier of the domain
- * object, typically as specified by {@link DomainObject#logicalTypeName()}.
+ * object, typically as specified by {@link javax.inject.Named}.
  *
  * <p>
  *     The object identifier is also accessible from the
@@ -50,7 +50,9 @@ import lombok.val;
  *
  * @since 1.x {@index}
  */
-@Property
+@Property(
+        domainEvent = Object_logicalTypeName.PropertyDomainEvent.class  // if this does not work, reopen CAUSEWAY-2235
+)
 @PropertyLayout(
         describedAs = "The identifier of this object instance, unique within its domain class.  Combined with the 'logical type name', is a unique identifier across all domain classes.",
         hidden = Where.ALL_TABLES,
@@ -66,12 +68,9 @@ public class Object_objectIdentifier {
 
     private final Object holder;
 
-    public static class ActionDomainEvent
-    extends org.apache.causeway.applib.CausewayModuleApplib.ActionDomainEvent<Object_objectIdentifier> {}
+    public static class PropertyDomainEvent
+    extends org.apache.causeway.applib.CausewayModuleApplib.PropertyDomainEvent<Object_objectIdentifier, String> {}
 
-    @Action(
-            domainEvent = Object_objectIdentifier.ActionDomainEvent.class   // this is a workaround to allow the mixin to be subscribed to (CAUSEWAY-2650)
-    )
     @MemberSupport public String prop() {
         val bookmark = bookmarkService.bookmarkForElseFail(this.holder);
         return bookmark.getIdentifier();