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:31:58 UTC
[causeway] branch master updated: CAUSEWAY-3310: [Demo] Action Layout Annotation - flesh out named
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 2c668a1153 CAUSEWAY-3310: [Demo] Action Layout Annotation - flesh out named
2c668a1153 is described below
commit 2c668a115304befced2b2f2ebc045d4dea5df295
Author: Andi Huber <ah...@apache.org>
AuthorDate: Tue Mar 14 09:31:53 2023 +0100
CAUSEWAY-3310: [Demo] Action Layout Annotation - flesh out named
---
.../ActionLayout/named/ActionLayoutNamedVm-description.adoc | 12 ++++++++----
.../actions/ActionLayout/named/ActionLayoutNamedVm.java | 8 +++++++-
2 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/named/ActionLayoutNamedVm-description.adoc b/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/named/ActionLayoutNamedVm-description.adoc
index 138a91d856..1b377682cc 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/named/ActionLayoutNamedVm-description.adoc
+++ b/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/named/ActionLayoutNamedVm-description.adoc
@@ -1,7 +1,11 @@
: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 `named` attribute ...
+The `named` attribute indicates the _name_ of this action as used for rendering its button (overriding the name derived from its name in code).
+A typical use case is if the desired name is a reserved Java keyword, such as `default` or `package`.
-WARNING: TODO[CAUSEWAY-3310]
-Name of this action (overriding the name derived from its name in code).
-A typical use case is if the desired name is a reserved Java keyword, such as default or package.
+[source,java,indent=0]
+----
+include::ActionLayoutNamedVm.java[tags=act]
+----
+
+<.> instead of `'Act'` the action's button is named `'xxx'`
\ No newline at end of file
diff --git a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/named/ActionLayoutNamedVm.java b/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/named/ActionLayoutNamedVm.java
index b98114884d..f85da93b3d 100644
--- a/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/named/ActionLayoutNamedVm.java
+++ b/examples/demo/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/named/ActionLayoutNamedVm.java
@@ -45,12 +45,18 @@ public class ActionLayoutNamedVm implements HasAsciiDocDescription {
return "ActionLayout#named";
}
+//tag::act[]
@Action
@ActionLayout(
- named = "xxx")
+ named = "xxx" // <.>
+//end::act[]
+ ,describedAs = "@ActionLayout(named = \"xxx\")"
+//tag::act[]
+ )
public Object act(final String arg) {
return this;
}
+//end::act[]
}
//end::class[]