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:37:30 UTC

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

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

commit f0c3cac5701a32efbc72a464f94ce2c8e33a4fe4
Author: Andi Huber <ah...@apache.org>
AuthorDate: Tue Mar 14 08:37:24 2023 +0100

    CAUSEWAY-3310: [Demo] Action Layout Annotation - flesh out cssClass
---
 .../cssClass/ActionLayoutCssClassVm-description.adoc        | 13 +++++++++----
 .../ActionLayout/cssClass/ActionLayoutCssClassVm.java       |  8 +++++++-
 2 files changed, 16 insertions(+), 5 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 10d3e3f737..1f09fb1173 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,7 +1,12 @@
 :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 ...
+The `cssClass` attribute indicates the CSS class that an action should (additionally) have.
 
-WARNING: TODO[CAUSEWAY-3310]
-Indicates the css class that an action should have.
-For the Wicket viewer, this can be a bootstrap class such as btn-info .
+For the _Wicket Viewer_, this can be a _Bootstrap_ class such as `btn-info`.
+
+[source,java,indent=0]
+----
+include::ActionLayoutCssClassVm.java[tags=act]
+----
+
+<.> appends the `btn-info` CSS class to the action's button and in effect renders it with _Bootstrap_ `Info` style
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/cssClass/ActionLayoutCssClassVm.java b/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/cssClass/ActionLayoutCssClassVm.java
index cf71a00e3b..9b00027642 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/cssClass/ActionLayoutCssClassVm.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/cssClass/ActionLayoutCssClassVm.java
@@ -45,12 +45,18 @@ public class ActionLayoutCssClassVm implements HasAsciiDocDescription {
         return "ActionLayout#cssClass";
     }
 
+//tag::act[]
     @Action
     @ActionLayout(
-            cssClass = "bg-dark")
+            cssClass = "btn-info" // <.>
+//end::act[]
+            ,describedAs = "@ActionLayout(cssClass = \"btn-info\")"
+//tag::act[]
+            )
     public Object act(final String arg) {
         return this;
     }
+//end::act[]
 
 }
 //end::class[]