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 07:56:08 UTC

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

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 03057f0439 CAUSEWAY-3310: [Demo] Action Layout Annotation - flesh out cssClassFa
03057f0439 is described below

commit 03057f043960f4ea640287988d413e556efa4048
Author: Andi Huber <ah...@apache.org>
AuthorDate: Tue Mar 14 08:56:04 2023 +0100

    CAUSEWAY-3310: [Demo] Action Layout Annotation - flesh out cssClassFa
---
 .../ActionLayoutCssClassVm-description.adoc        |  2 +-
 .../ActionLayoutCssClassFaVm-description.adoc      | 15 ++++++++-------
 .../cssClassFa/ActionLayoutCssClassFaVm.java       | 22 ++++++++++++++++++++--
 3 files changed, 29 insertions(+), 10 deletions(-)

diff --git a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/cssClass/ActionLayoutCssClassVm-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/cssClass/ActionLayoutCssClassVm-description.adoc
index 1f09fb1173..4fe351f4db 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/cssClass/ActionLayoutCssClassVm-description.adoc
+++ b/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/cssClass/ActionLayoutCssClassVm-description.adoc
@@ -1,6 +1,6 @@
 :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 `cssClass` attribute indicates the CSS class that an action should (additionally) have.
+The `cssClass` attribute indicates the CSS class (or classes) that an action should (additionally) have.
 
 For the _Wicket Viewer_, this can be a _Bootstrap_ class such as `btn-info`.
 
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/cssClassFa/ActionLayoutCssClassFaVm-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/cssClassFa/ActionLayoutCssClassFaVm-description.adoc
index 5dbd369315..de1f63b6e0 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/cssClassFa/ActionLayoutCssClassFaVm-description.adoc
+++ b/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/cssClassFa/ActionLayoutCssClassFaVm-description.adoc
@@ -1,12 +1,13 @@
 :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 `cssClassFa` attribute ...
+The `cssClassFa` attribute indicates the _Font Awesome_ CSS class (or classes) to decorate an action (button or menu item).
 
-WARNING: TODO[CAUSEWAY-3310]
-Indicates theFont AwesomeCSS class to decorate an action (button or menu item).
+[source,java,indent=0]
+----
+include::ActionLayoutCssClassFaVm.java[tags=actLeftAndRight]
+----
 
-The `cssClassFaPosition` attribute ...
+<.> in effect uses the `bus` icon for this action
 
-WARNING: TODO[CAUSEWAY-3310]
-Indicates the position of the Font Awesomeicon.
-The icon could be rendered on the left or the right of the action button
+<.> the `cssClassFaPosition` attribute indicates the position of the _Font Awesome_ icon; 
+in effect the icon is rendered on the _right_ of the action button
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/cssClassFa/ActionLayoutCssClassFaVm.java b/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/cssClassFa/ActionLayoutCssClassFaVm.java
index f07070e083..a8e27790e7 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/cssClassFa/ActionLayoutCssClassFaVm.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/cssClassFa/ActionLayoutCssClassFaVm.java
@@ -46,13 +46,31 @@ public class ActionLayoutCssClassFaVm implements HasAsciiDocDescription {
         return "ActionLayout#cssClassFa";
     }
 
+//tag::actLeftAndRight[]
+    @Action
+    @ActionLayout(
+            cssClassFa = "fa-bus"                         // <.>
+//end::actLeftAndRight[]
+            ,describedAs = "@ActionLayout(cssClassFa = \"fa-bus\")"
+//tag::actLeftAndRight[]
+            )
+    public Object actLeft(final String arg) {
+        return this;
+    }
+
     @Action
     @ActionLayout(
             cssClassFa = "fa-bus",
-            cssClassFaPosition = CssClassFaPosition.RIGHT) //TODO[CAUSEWAY-3310] showcase LEFT and RIGTH
-    public Object act(final String arg) {
+            cssClassFaPosition = CssClassFaPosition.RIGHT // <.>
+//end::actLeftAndRight[]
+            ,describedAs = "@ActionLayout(cssClassFa = \"fa-bus\", \n"
+                    + "cssClassFaPosition = CssClassFaPosition.RIGHT)"
+//tag::actLeftAndRight[]
+            )
+    public Object actRight(final String arg) {
         return this;
     }
+//end::actLeftAndRight[]
 
 }
 //end::class[]