This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch v2
in repository https://gitbox.apache.org/repos/asf/causeway-app-referenceapp.git
The following commit(s) were added to refs/heads/v2 by this push:
new 84d5087 backports showcases from v4
84d5087 is described below
commit 84d5087eaaafbfed54c84d9a733c8962b9acfa9e
Author: andi-huber <[email protected]>
AuthorDate: Wed Mar 11 22:01:31 2026 +0100
backports showcases from v4
---
.../ActionLayoutHiddenEntity-description.adoc | 27 +++++++----
...Entity_changeNameHiddenObjectFormsRedirect.java | 53 ++++++++++++++++++++++
...ddenEntity_changeNameHiddenObjectFormsVoid.java | 42 +++++++++++++++++
.../hidden/ActionLayoutHiddenPage-description.adoc | 29 ++++++++----
4 files changed, 133 insertions(+), 18 deletions(-)
diff --git
a/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/hidden/ActionLayoutHiddenEntity-description.adoc
b/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/hidden/ActionLayoutHiddenEntity-description.adoc
index fe3bf15..a8959e7 100644
---
a/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/hidden/ActionLayoutHiddenEntity-description.adoc
+++
b/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/hidden/ActionLayoutHiddenEntity-description.adoc
@@ -17,15 +17,6 @@ include::ActionLayoutHiddenEntity_changeName.java[tags=class]
----
<.> no `hidden` attribute specified, so implicitly visible
-* `hidden` on object forms (but not necessarily on collections):
-+
-[source,java]
-.ActionLayoutHiddenEntity_changeNameHiddenObjectForms.java
-----
-include::ActionLayoutHiddenEntity_changeNameHiddenObjectForms.java[tags=class]
-----
-<.> action should _NOT_ be visible for this entity.
-
* `hidden` on collections (but not necessarily on object forms):
+
[source,java]
@@ -44,5 +35,23 @@
include::ActionLayoutHiddenEntity_changeNameHiddenEverywhere.java[tags=class]
----
<.> action should _NOT_ be visible for this entity.
+== Table Row Actions
+
+Table Row Actions are activated (shown) based on whether the `hidden`
+attribute allows for rendering in Tables (specifically STANDALON and/or
PARENTED depending on context).
+
+* `hidden` on object forms (but not necessarily on collections):
++
+[source,java]
+.ActionLayoutHiddenEntity_changeNameHiddenObjectForms.java
+----
+include::ActionLayoutHiddenEntity_changeNameHiddenObjectForms.java[tags=class]
+----
+<.> action should _NOT_ be visible for this entity in object forms, but in
tables.
+
+What happens after Action invocation (where to redirect to), is governed by
the Action's return type:
+. `void` -> stay on current Page
+. if return type is `T` and `T` is also the object the Action is declared on
or mixed in to -> stay on current Page
+. in any other case redirect to a new page (new browser-tab or window)
diff --git
a/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/hidden/ActionLayoutHiddenEntity_changeNameHiddenObjectFormsRedirect.java
b/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/hidden/ActionLayoutHiddenEntity_changeNameHiddenObjectFormsRedirect.java
new file mode 100644
index 0000000..153b69b
--- /dev/null
+++
b/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/hidden/ActionLayoutHiddenEntity_changeNameHiddenObjectFormsRedirect.java
@@ -0,0 +1,53 @@
+
+/*
+ * 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 agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package demoapp.dom.domain.actions.ActionLayout.hidden;
+
+import java.util.List;
+
+import javax.inject.Inject;
+
+import org.apache.causeway.applib.annotation.ActionLayout;
+import org.apache.causeway.applib.annotation.MemberSupport;
+import org.apache.causeway.applib.annotation.Where;
+import org.apache.causeway.applib.services.repository.RepositoryService;
+
+import lombok.RequiredArgsConstructor;
+
+import
demoapp.dom.domain.actions.Action.choicesFrom.jpa.ActionChoicesFromEntityImpl;
+
+@ActionLayout(hidden = Where.OBJECT_FORMS)
+@RequiredArgsConstructor
+public class ActionLayoutHiddenEntity_changeNameHiddenObjectFormsRedirect {
+ @Inject RepositoryService repositoryService;
+
+ @SuppressWarnings("unused")
+ private final ActionLayoutHiddenEntity entity;
+
+ // redirecting to a different page
+ @MemberSupport public ActionChoicesFromEntityImpl act(
+ final ActionChoicesFromEntityImpl redirect) {
+ return redirect;
+ }
+
+ public List<ActionChoicesFromEntityImpl> choices0Act() {
+ return
repositoryService.allInstances(ActionChoicesFromEntityImpl.class);
+ }
+
+}
diff --git
a/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/hidden/ActionLayoutHiddenEntity_changeNameHiddenObjectFormsVoid.java
b/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/hidden/ActionLayoutHiddenEntity_changeNameHiddenObjectFormsVoid.java
new file mode 100644
index 0000000..ecf8b5b
--- /dev/null
+++
b/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/hidden/ActionLayoutHiddenEntity_changeNameHiddenObjectFormsVoid.java
@@ -0,0 +1,42 @@
+
+/*
+ * 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 agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package demoapp.dom.domain.actions.ActionLayout.hidden;
+
+import org.apache.causeway.applib.annotation.ActionLayout;
+import org.apache.causeway.applib.annotation.MemberSupport;
+import org.apache.causeway.applib.annotation.Where;
+
+import lombok.RequiredArgsConstructor;
+
+@ActionLayout(hidden = Where.OBJECT_FORMS)
+@RequiredArgsConstructor
+public class ActionLayoutHiddenEntity_changeNameHiddenObjectFormsVoid {
+
+ private final ActionLayoutHiddenEntity entity;
+
+ @MemberSupport public void act(
+ final String newName) {
+ entity.setName(newName);
+ }
+
+ public String default0Act() {
+ return entity.getName();
+ }
+}
diff --git
a/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/hidden/ActionLayoutHiddenPage-description.adoc
b/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/hidden/ActionLayoutHiddenPage-description.adoc
index 346c288..8381f2b 100644
---
a/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/hidden/ActionLayoutHiddenPage-description.adoc
+++
b/domain/src/main/java/demoapp/dom/domain/actions/ActionLayout/hidden/ActionLayoutHiddenPage-description.adoc
@@ -25,15 +25,6 @@ include::ActionLayoutHiddenEntity_changeName.java[tags=class]
<.> action _should_ be visible for this entity when rendered both on an object
form and within a collection.
+
-* `hidden` on object forms (but not necessarily on collections):
-+
-[source,java]
-.ActionLayoutHiddenEntity_changeNameHiddenObjectForms.java
-----
-include::ActionLayoutHiddenEntity_changeNameHiddenObjectForms.java[tags=class]
-----
-<.> action should be visible for this entity when rendered in a collection.
-
* `hidden` on collections (but not necessarily on object forms):
+
[source,java]
@@ -59,3 +50,23 @@ But although there is no difference in the UI, a hidden
action _is_ part of the
A rare (but valid) use case is to invoke such a hidden action using the
link:https://causeway.apache.org/refguide/${CAUSEWAY_VERSION}/applib/index/services/wrapper/WrapperFactory.html#wrap(t,-synccontrol)[WrapperFactory]
(skipping rules).
This can be for example to publish executions to any registered
link:https://causeway.apache.org/refguide/${CAUSEWAY_VERSION}/applib/index/services/publishing/spi/ExecutionSubscriber.html[ExecutionSubscriber]s.
+
+== Table Row Actions
+
+Table Row Actions are activated (shown) based on whether the `hidden`
+attribute allows for rendering in Tables (specifically STANDALON and/or
PARENTED depending on context).
+
+* `hidden` on object forms (but not necessarily on collections):
++
+[source,java]
+.ActionLayoutHiddenEntity_changeNameHiddenObjectForms.java
+----
+include::ActionLayoutHiddenEntity_changeNameHiddenObjectForms.java[tags=class]
+----
+<.> action should _NOT_ be visible for this entity in object forms, but in
tables.
+
+What happens after Action invocation (where to redirect to), is governed by
the Action's return type:
+
+. `void` -> stay on current Page
+. if return type is `T` and `T` is also the object the Action is declared on
or mixed in to -> stay on current Page
+. in any other case redirect to a new page (new browser-tab or window)
\ No newline at end of file