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:43:12 UTC

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

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

commit 56cdaf36651a174935b1e0f5686f1801a24a0cfc
Author: Andi Huber <ah...@apache.org>
AuthorDate: Tue Mar 14 09:43:07 2023 +0100

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

diff --git a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/hidden/ActionLayoutHiddenVm-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/hidden/ActionLayoutHiddenVm-description.adoc
index bf5cd246b1..90e1e307e9 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/hidden/ActionLayoutHiddenVm-description.adoc
+++ b/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/hidden/ActionLayoutHiddenVm-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 `hidden` attribute ...
+The `hidden` attribute indicates where in the UI the action should *not* be visible.
 
-WARNING: TODO[CAUSEWAY-3310]
-Indicates where in the UI the action should not not be visible.
+[source,java,indent=0]
+----
+include::ActionLayoutHiddenVm.java[tags=act]
+----
+
+<.> in effect makes this action's button invisible _everywhere_ (in the UI)
\ No newline at end of file
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/hidden/ActionLayoutHiddenVm.java b/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/hidden/ActionLayoutHiddenVm.java
index a83faf5108..ca661412a9 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/hidden/ActionLayoutHiddenVm.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/hidden/ActionLayoutHiddenVm.java
@@ -46,12 +46,14 @@ public class ActionLayoutHiddenVm implements HasAsciiDocDescription {
         return "ActionLayout#hidden";
     }
 
+//tag::act[]
     @Action
     @ActionLayout(
-            hidden = Where.STANDALONE_TABLES)
+            hidden = Where.EVERYWHERE) // <.>
     public Object act(final String arg) {
         return this;
     }
+//end::act[]
 
 }
 //end::class[]