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 6cc9f27f286a9a68e20f730901293f1458b45410
Author: Dan Haywood <[email protected]>
AuthorDate: Sun May 26 10:16:40 2024 +0100

    associates 'updateAttachment' action with 'name' property using .layout.xml
    
    also specifies the position of its button on the panel (rather than under 
the property)
---
 .../main/java/domainapp/modules/petowner/dom/petowner/PetOwner.java   | 1 -
 .../java/domainapp/modules/petowner/dom/petowner/PetOwner.layout.xml  | 4 +++-
 2 files changed, 3 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 e43cfa1..9fef62b 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
@@ -218,7 +218,6 @@ public class PetOwner implements Comparable<PetOwner>, 
CalendarEventable {
 
 
     @Action(semantics = IDEMPOTENT, commandPublishing = Publishing.ENABLED, 
executionPublishing = Publishing.ENABLED)
-    @ActionLayout(associateWith = "attachment", position = 
ActionLayout.Position.PANEL)
     public PetOwner updateAttachment(
             @Nullable final Blob attachment) {
         setAttachment(attachment);
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 bc0ce53..4a0db96 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
@@ -65,7 +65,9 @@
             <bs3:row>
                 <bs3:col span="12">
                     <cpt:fieldSet name="Content" id="content">
-                        <cpt:property id="attachment"/>
+                        <cpt:property id="attachment">
+                            <cpt:action id="updateAttachment" 
position="PANEL"/>
+                        </cpt:property>
                     </cpt:fieldSet>
                 </bs3:col>
             </bs3:row>

Reply via email to