You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@causeway.apache.org by ah...@apache.org on 2023/03/14 08:21:53 UTC

[causeway] branch master updated: CAUSEWAY-3310: [Demo] Action Layout Annotation - flesh out describedAs

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


The following commit(s) were added to refs/heads/master by this push:
     new 6d24a31434 CAUSEWAY-3310: [Demo] Action Layout Annotation - flesh out describedAs
6d24a31434 is described below

commit 6d24a31434fc1245a111dce2dbeb307dfbcf43a8
Author: Andi Huber <ah...@apache.org>
AuthorDate: Tue Mar 14 09:21:47 2023 +0100

    CAUSEWAY-3310: [Demo] Action Layout Annotation - flesh out describedAs
---
 .../describedAs/ActionLayoutDescribedAsVm-description.adoc     | 10 +++++++---
 .../ActionLayout/describedAs/ActionLayoutDescribedAsVm.java    |  5 ++++-
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/describedAs/ActionLayoutDescribedAsVm-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/describedAs/ActionLayoutDescribedAsVm-description.adoc
index 959da4e444..ab0ecac7c4 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/describedAs/ActionLayoutDescribedAsVm-description.adoc
+++ b/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/describedAs/ActionLayoutDescribedAsVm-description.adoc
@@ -1,6 +1,10 @@
 :Notice: 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 ag [...]
 
-The `describedAs` attribute ...
+The `describedAs` attribute indicates a description of this action, eg to be rendered in a tooltip.
 
-WARNING: TODO[CAUSEWAY-3310]
-Description of this action, eg to be rendered in a tooltip.
+[source,java,indent=0]
+----
+include::ActionLayoutDescribedAsVm.java[tags=act]
+----
+
+<.> in effect adds a tooltip to this action's button, that shows on _mouse over_
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/describedAs/ActionLayoutDescribedAsVm.java b/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/describedAs/ActionLayoutDescribedAsVm.java
index 60de5fd367..a53dd9889d 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/describedAs/ActionLayoutDescribedAsVm.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/describedAs/ActionLayoutDescribedAsVm.java
@@ -45,12 +45,15 @@ public class ActionLayoutDescribedAsVm implements HasAsciiDocDescription {
         return "ActionLayout#describedAs";
     }
 
+//tag::act[]
     @Action
     @ActionLayout(
-            describedAs = "xxx")
+            describedAs = "A good description could go here." // <.>
+            )
     public Object act(final String arg) {
         return this;
     }
+//end::act[]
 
 }
 //end::class[]