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/causeway-app-petclinic.git

commit eef8300df068be0c133e537fbc66439ec66fc273
Author: Dan Haywood <[email protected]>
AuthorDate: Sun May 26 10:23:24 2024 +0100

    associates version property with its fieldset using .layout.xml
    
    annotates 'version' with @Property instead
    
    (need either @Property or @PropertyLayout to be picked up)
---
 .../main/java/domainapp/modules/petowner/dom/petowner/PetOwner.java   | 2 +-
 .../java/domainapp/modules/petowner/dom/petowner/PetOwner.layout.xml  | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git 
a/module-petowner/src/main/java/domainapp/modules/petowner/dom/petowner/PetOwner.java
 
b/module-petowner/src/main/java/domainapp/modules/petowner/dom/petowner/PetOwner.java
index ec7cb09..5ffbb6d 100644
--- 
a/module-petowner/src/main/java/domainapp/modules/petowner/dom/petowner/PetOwner.java
+++ 
b/module-petowner/src/main/java/domainapp/modules/petowner/dom/petowner/PetOwner.java
@@ -104,7 +104,7 @@ public class PetOwner implements Comparable<PetOwner>, 
CalendarEventable {
 
     @Version
     @Column(name = "version", nullable = false)
-    @PropertyLayout(fieldSetId = "metadata", sequence = "999")
+    @Property
     @Getter @Setter
     private long version;
 
diff --git 
a/module-petowner/src/main/java/domainapp/modules/petowner/dom/petowner/PetOwner.layout.xml
 
b/module-petowner/src/main/java/domainapp/modules/petowner/dom/petowner/PetOwner.layout.xml
index 357112a..a82ca40 100644
--- 
a/module-petowner/src/main/java/domainapp/modules/petowner/dom/petowner/PetOwner.layout.xml
+++ 
b/module-petowner/src/main/java/domainapp/modules/petowner/dom/petowner/PetOwner.layout.xml
@@ -34,7 +34,9 @@
                         <bs3:tab name="Metadata">
                             <bs3:row>
                                 <bs3:col span="12">
-                                    <cpt:fieldSet name="Metadata" 
id="metadata"/>
+                                    <cpt:fieldSet name="Metadata" 
id="metadata">
+                                        <cpt:property id="version"/>
+                                    </cpt:fieldSet>
                                 </bs3:col>
                             </bs3:row>
                         </bs3:tab>

Reply via email to